Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Our 15 AI experts built the most comprehensive, practical, 90+ lesson courses to master AI Engineering - we have pathways for any experience at Towards AI Academy. Cohorts still open - use COHORT10 for 10% off.

Publication

Deploy Machine Learning Web Apps for Free
Machine Learning   Programming

Deploy Machine Learning Web Apps for Free

Last Updated on January 6, 2023 by Editorial Team

Author(s): Aniket Maurya

Machine Learning, Programming

In this tutorial, I will explain how to deploy any Python web app on Heroku cloud.

Deploy Machine Learning Web Apps for Free
Photo by Kevin Ku on Unsplash

Deploying a Machine Learning model is a difficult task due to the requirement of large memory and powerful computation. This tutorial focuses on a simple deployment technique that can be used to deploy any Python web app for free.

Read my previous article to learn how to build an “Image classification web app with FastAPI and Tensorflow”

I have also created a YouTube tutorial on Deploying Python app on Heroku

First of all, you will need a Heroku id, so go now and register for a free account.

For deploying any Python app on Heroku, we need three files- requirements.txt, runtime.txt, and Procfile.

  • requirements.txt is a normal text file that contains Python packages required to run the app.
  • runtime.txt is a text file that will contain the Python Version you want your app to run on.
  • Procfile is will contain the command to launch your web app. For example, you can use
# method 1
python application/server/main.py
# or uvicorn if you are deploying a uvicorn server
uvicorn application.server.main:app

Go to your Heroku dashboard then click on New and create a new app

Enter your App name and select the Server region that is nearest to your location and click on Create app

After you create the app, you will see the deployment methods — Heroku Git, GitHub, and Container Registry. I will use the GitHub method. For this just push your code repository to your GitHub account and then connect to GitHub on Heroku.

Then search the repository and connect it to your Heroku app.

After this, you will see a deploy button, select the branch of your Git repository that you want to be deployed, and click on deploy.

Then Heroku will automatically start your deployment 🎉🎉
After deployment, you can access your app from any web browser 🔥

Hope this article helped you in the deployment of your web app. If you have some feedback or suggestion please let me know in the comment section.

Follow me on Twitter: https://twitter.com/aniketmaurya

Subscribe to my YouTube channel: https://www.youtube.com/channel/UCRuFsj94hWecPkuEr4f5Xww


Deploy Machine Learning Web Apps for Free was originally published in Towards AI — Multidisciplinary Science Journal on Medium, where people are continuing the conversation by highlighting and responding to this story.

Published via Towards AI


Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!


Discover Your Dream AI Career at Towards AI Jobs

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!

Note: Content contains the views of the contributing authors and not Towards AI.