Deploy Machine Learning Web Applications with Streamlit

Joan Ngugi
7 min readApr 23, 2022

As a data scientist or machine learning engineer, it is not enough to leave your machine learning models in your notebooks. You will want your end-users to seamlessly interact with your model in a creative and easy way.

Streamlit is a Python-based library that allows the creation and deployment of machine learning web applications. It is also fast and flexible, turning application development time from days into hours.

Using Flask or Django or turning models into an Application Programming Interfaces (APIs) are also alternatives, the only disclaimer is that you need to have software engineering skills.

In this article, we will learn how to

  1. Export your machine learning model as a pickle file.
  2. Create a streamlit interface to interact with our pickle file.
  3. Get model results from the streamlit interface.
  4. Deploy the streamlit app.

Pre-Requisites

  • This article assumes you have knowledge of building machine learning models.
  • Download a Python IDE for building the Streamlit app. For this project, I’ll use PyCharm.

Find the code for this article via Github Repo

--

--

Joan Ngugi
Joan Ngugi

No responses yet