How to deploy NLP model on Heroku using GitHub
In this tutorial, we are going to deploy the NLP model with the flask on the Heroku platform. Here, we are going to use the GitHub method to deploy the flask application on the server. In the previous tutorials, we learnt how to train the movie review sentiment analysis model and how to deploy the movie reviews sentiment analysis model on the localhost using the flask application.
Note : You can fork the application from my GitHub account using the below link. Just go to my GitHub account and click on the fork button. This application will be added in your GitHub account. You can use it for the learning of deployment on heroku using GitHub. I have implemented the flask application for the Movies Reviews Sentiment Analysis.
GitHub of Movies Reviews Sentiment Analysis : Fork Repository From GitHub
How to train Movies Reviews Sentiment Analysis : Movies Reviews Sentiment Analysis
How to deploy Movies Reviews Sentiment Analysis on localhost : Deployment on localhost
Deployed flask application on heroku : Deployment on Heroku
Now let's start :-
Firstly, go to the heroku website then click on the signup for free button which you can see in the below image.
Visit heroku : Heroku
Then fill your data
- First Name : ( eg : Rahul )
- Last Name : ( eg : Sharma )
- Email Address : ( eg : rahulsharma@gmail.com )
- Company Name : ( eg : company name or college name )
- Role : ( eg : student or role in company )
- Country : ( eg : India)
- Primary deployment language : ( eg : Python )
- Click on I'm not a robot
And then simply click on the create free account. You can see the below image as a example :
Then you'll get a confirm email as below images. Then go to you Gmail account and confirm the account using the given link.
Then you'll get a new window for make a new password for your GitHub account. Simply enter the new and confirm password and click on set password and log in like a below image.
Then simply click on 'click here to proceed' then click on 'Accept'. Now you'll get a dashboard of your application.
Then simply click on the New button which is top right corner of the heroku website or click on the create new app. After that, give your application name without special character, underscores, numeric character, capital letter alphabets and spaces and then simply click on the create app as you can see in the below picture.
Then you'll get a dashboard, simply click on the Deploy tab, then connect your GitHub account to heroku by just simply click on the GitHub to connect your GitHub with the heroku. After click on the GitHub, enter your username and password to connect to the GitHub account. And make sure that your machine learning application should be pushed into the GitHub account.
For example : if your NLP model is deployed using the flask application. So make sure that your hierarchy of the flask application should be like below image. You application mush contain the template and static folder, python file, machine learning model, requirements.txt file and the Procfile.
Template : It contain your webpages (html files).
Static : It contain your CSS, JavaScript, images files
Python file : This file contains the code of working application and embedded the webpage.
Machine learning model : This is your trained model.
requirements.txt : This file contains all the required modules which are used to run and implement the flask application.
Procfile : Procfile file (without extension) contains the one line code for run the application on heroku.
After connect to the GitHub account with heroku. you will get an interface like this :
Then simply search your application with the name of the application which is available in the GitHub account. If your application is available in the GitHub account then your application name will be display after search. If it will be present in the GitHub, then simply click on the connect button. Your application will become ready for the deployment. Then scroll page and you will get a Deploy button. Just click on the Deploy button and your application will start to deploy on the server and it will task 2-3 minutes to deploy the application on server. Make sure that your application should be less than 500mb.
After completing the process of deployment, you'll get a view button to see your website. Just click on the view button, your application will start to run on server. And you can share the url with your friends.
Video Tutorial
Thank You !!!!!








NJ Online Casino Bonus 2021 - BBSJON
ReplyDeleteNJ online casino bonus 2021 | Claim a first-time 더킹카지노 도메인 bonus of 온라인 카지노 up 카지노사이트 to $1,000 온라인 카지노 | Use our NJ online 007카지노 casino bonus code SPORTSBOOKBONUS to get a first-time