Deploy model on Heroku.
Set up your custom domain to point to your VPS.
Repeat the setup on AWS, GCP, DigitalOcean or any other VPS of your choice.
Read the documentation for flask, mlflow, pytorch, surprise, pandas.
Read up about function decorators in Python (see here and here for instance). Function decorators add functionality to an existing function, and are an example of metaprogramming.
Try to set up HTTPS with Lets Encrypt for the flask based model deployed on a single VPS such as EC2.
Add a WSGI server such as gunicorn
. A Web Server Gateway Interface (WSGI) server implements the web server side of the WSGI interface for running Python web applications. See here.