How I Deployed my First Machine Learning Model Using Streamlit (Part 2)

codinghappinessweb

Omale Happiness Ojone

Posted on July 17, 2021

How I Deployed my First Machine Learning Model Using Streamlit (Part 2)

In this article I will be explaining how to deploy your machine learning model online.

But before then here is the link to the part 1 of this article:
https://dev.to/codinghappinessweb/how-i-deployed-my-first-machine-learning-model-using-streamlit-part-1-31h9

After signing up on streamlit, you will get an invite from the app which would look like this.

Alt Text

It takes 1-2days before it could get accepted, the acceptance invite looks like this.

Alt Text

After signing in, you create a github repository and name it i.e Loan Prediction. Add the project files to the repository created.

Some of the files you should add to the repository includes:

  1. The code for the project
  2. The python script for the project
  3. The pkl file which is classifier.pkl for this project
  4. Requirement.txt file

To get the requirement.txt file just type "pip install pipreqs" on your command prompt, Locate the folder where your python file for the streamlit app is, open a terminal inside that folder and run this command "-pipreqs". It will scan through all the python file there and create a requirement.txt file for you.

Next, Sign into streamlit share: you will create a new app, link your github repository to it and specify the main python file for the app, then you deploy.

Finally your app deployment is ready!!!
You can now share the links to your friends.

End Notes

Congratulations! We have now successfully completed loan prediction model deployment using Streamlit. The deployment is simple, fast, and most importantly in Python. I encourage you to first try this particular project, play around with the values as input, and check the results. And then, you can try out other machine learning projects as well and perform model deployment using streamlit.

Lastly, I would love to hear your feedback and suggestions for this article. If you have any questions related to the article, post them in the comments section below. I will actively look forward to answering them.

Link to part 1 of the article:https://dev.to/codinghappinessweb/how-i-deployed-my-first-machine-learning-model-using-streamlit-part-1-31h9

You can view the app viaStreamlit

You can access the datasetGithub

And my jupyter notebookGithub

💖 💪 🙅 🚩
codinghappinessweb
Omale Happiness Ojone

Posted on July 17, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related