Step-3:Creating the app on Heroku
Heroku is a container-based cloud Platform as a Service (PaaS) that enables users to deploy and manage their apps. Heroku platform is very flexible, easy to use, and offers users a simple and easy way to run their apps on the web.
In order to use Heroku, you need to create an account at https://signup.heroku.com/.
Heroku offers different methods to deploy your model. We will cover model deployment with Heroku CLI and GitHub connection.
If you want to deploy your model using Heroku CLI, first you need to download Heroku CLI and then follow the steps below in the command line.
- heroku login
- heroku create <app name>
- git init
- git add .
- git commit -m “deployment”
- git push heroku master
- heroku open
Another method is to deploy your model via a GitHub connection to Heroku.
- First login to your Heroku account.
- Click on “New” and then “Create new app”.
- Give your app a proper name and click on “Create app”.
- Choose GitHub as a Deployment method.
- Enter the name of the GitHub repo you have created to deploy your model, and click on “Search”.
- When you see the repo, click on the “Connect” button.
- Finally, click on the “Deploy Branch” button and your app will automatically be uploaded to Heroku.
You can check your model by clicking on the “View” button and this time try it on the web.
In this two-part story, we covered the machine learning pipeline, necessary files for model deployment, and finally followed a step by step approach to create a web application using Flask on Heroku.
Heroku’s easy to use platform provides an amazing opportunity to prototype the final product. By taking this opportunity, we were able to run our app on the web.
You have created your first app on the web and met with Heroku. Now it is time to create some other apps!