A demo on hosting you ML model Flask app on heroku CLI using git.
This is just a demo to deploy a Flask app on Heroku, there are plenty of other hosting platforms available like: pythonanywhere,AWS,gcloud and more, do check them out.
- Python
- pip
- Heroku CLI
- Git
- templates : folder containing your index.html file
- Procfile : Procfile is a mechanism for declaring what commands are run by your application’s dynos on the Heroku platform
- requirements.txt : containing the list of all the required libraries.
Rest are the basic Flask App file
create a virtual env
conda create --name venv
pip install flask gunicorn
-
get all the files from here or create new
-
Inside the folder perform the following steps
-
create and push all the files in a git repo using
git add . git commit -m 'first commit' git push
-then do
heroku login
heroku create name_you_want_for_your_app
git push heroku master
- After the above command you'll get a link for the deployed app on your screen.
For more detailed steps follow: Heroku