Deploying Machine Learning Project On Website

Arshman Shahbaz
3 min readSep 12, 2022

--

Do you want to deploy your project online? would you like to Integrate it with the web? Well, you have crashed at the right place. Let us get started from scratch. It is quite easy to implement Machine Learning Algorithms compared to deploying those projects and have good use of them in our community. I will guide you on how to deploy your projects in a few simple steps using streamlit.

Diabetes Prediction System

1. Pickle File

Once you have made your Machine Learning project, what you ought to do is save the project in a pickle file using the pickle library. What pickle does is flatten your data into objects and structures in a structured form. This helps deploy your project, as all your data is structured into one file.

Importing & using pickle in order to save the model in pkl format

2. Pipreq

This is a python library which is used to point out which dependencies are in use in a particular project. It outputs names of python libraries being used and their version. This is important to publish your project using streamlit.

Output of running piqreq command

3. Streamlit

Finally, we will deploy our model using streamlit. Streamlit is a python library which makes our life easier. It creates a simple user interface and embeds our machine learning model with GUI. After setting up our project and when it is ready, run “streamlit run appname.py”. This will redirect you to a live server where your application is running. If the project is running without any errors then move on to the next step.

4. GitHub

Make a new repository in your GitHub profile and add this project.

5. Streamlit cloud

Make a new account in streamlit cloud. After making your account, connect streamlit account with GitHub. Here is the link https://streamlit.io/

6. Create your first app

When signed in streamlit cloud. Click ‘New App’ and create your project. Fill in the information related to your repository on GitHub of the project you want to publish.

After you are done, click deploy and within a few moments your project will be live. Gracias! You Have done it.🎉🎉

Good Resources: -

Difference between AI vs Machine learning vs Deep learning -> https://youtu.be/4fGx08QKymQ

--

--

Arshman Shahbaz
Arshman Shahbaz

Written by Arshman Shahbaz

An AI enthusiastic, My expertise are on Machine learning, Deep Learning, Hyperparameter tuning and CNN.

Responses (2)