Hey Fermin, First of all, it's amazing you took the time and effort to follow the article and the code. In this article, I primarily outlined 3 stages for diabetes prediction example.
At pre-processing we clean the existing data and make all the transformations needed.
During training, we use the transformed data to develop our model.
Finally, at inference, we take the new data we received from the user through the Web App, we transform the data similar to what we did during the pre-processing stage, use the model we built during the training stage to predict the output class, and display it back in the Web App.
I hope this clarified the different stages and the data being used in each stage. Feel free to reach out to me at https://www.linkedin.com/in/arunn-thevapalan/ if you have more questions. Happy to answer!