Enrollments closing soon for Post Graduate Certificate Program in Applied Data Science & AI By IIT Roorkee | 3 Seats Left

  Apply Now

Project- How to Host an Image Classification App on Heroku

2 / 8

Understanding the Workflow of Heroku Deployment

There are a set of steps to follow in order to deploy an app onto the Heroku Platform:

1. Make a web interface for our model:

  • It is quite obvious that we should be having an app, for us it host it publicly :P.

  • So to host a machine learning or deep learning model, the first step is to train a model.

  • Then, we create a web interface, often using frameworks like Django or Flask, and make the app and web-app.

  • We have already done all this in the project How to Deploy an Image Classification Model using Flask.

2. Create the requirements.txt file:

  • A requirements.txt file is where we mention the details of all the packages - along with their corresponding versions - which are used in the project.

  • This is a very important step in every real-case scenario because the app runs smoothly only if its dependencies are correctly installed.

  • Similarly, Heroku relies on this requirements.txt file to install the dependencies and makes all the necessary arrangements to host the app.

3. Make the Procfile:

  • The Procfile is like a configuration file to our app.

  • It mentions to Heroku the entry-point for the app.

  • Hence we shall define this file.

4. Commit the code on Git and push it to GitHub:

  • GitHub is a version-control platform to host the source codes of our projects.

  • To host our app on Heroku, we link our project directory - along with the Procfile and requirements.txt - which we push to GitHub.

5. Signup on Heroku Platform and Setting up Heroku::

  • We need to create an account on Heroku.

  • Once we log-in, we choose the option to link the GitHub repository to Heroku.

  • Heroku then provides us the option to deploy(either automatically or manually). It installs the necessary dependencies as per the requirements.txt and sets all the configurations as per the Procfile.

  • After Heroku does all such background work to host our app, it provides the link to the app.

  • We could browse through that link and use our app.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...