Project- How to Host an Image Classification App on Heroku

5 / 8

Creating the Procfile

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

  • Hence we shall define this file.

Note:

  • We need to let Heroku know that we are using gunicorn. So we mention web: gunicorn in the Procfile.

  • Followed by web: gunicorn, we write app:app in the Procfile.

    • For app:app, the format is <<filename>>:<<flaskapp_in_that_file>>

    • The app to the left side of : indicates the name of the file where we initialized the Flask and defined routes and methods. Since it is app.py in our case, we just write app to the left side of the :.

    • The app to the right side of : indicates the name of the Flask object inside app.py. If we have a quick look inside the app.py file(using nano app.py), we initialized Flask by writing app = Flask(__name__). Thus we write app to the right-side of :.

INSTRUCTIONS
  • Make sure to be inside the Image-Classification-App directory:

    cd ~
    cd Image-Classification-App
    
  • Create a file named Procfile using the following command in the console:

    nano Procfile
    
  • Also, Write the following in the Procfile. One space should be there between web: and gunicorn.

    web: gunicorn app:app
    

    Then click Ctrl+X, hit the key y, and then the Enter key.


No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...