Deploying the project to Heroku

In this section, we will take a look at how we can deploy our demonstration app to Heroku. In the following steps, we will create an account on Heroku and add the modifications required to the code, which will make it eligible to host on the platform:

  1. First, visit https://id.heroku.com/login to get the login screen for Heroku. If you do not have a user account already, you can go through the sign-up process to create one for free:

  1. We will now create a Procfile file. In this step, we create a blank file called Procfile in the app directory. Once created, we add the following line to it:
web: gunicorn app:app ...

Get Hands-On Python Deep Learning for the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.