Streamlit is a fantastic tool for creating web applications quickly for machine learning projects.

Generally, creating a web interface to interact with backend machine learning algorithms is a tedious task. You need to have an entirely different skillset to develop software products. These are not the kind of tools typical data scientists use on a daily basis.

Yet, the solutions are obvious. Hire a team of web developers to work along with your data team. Hire a front-end specialist who does React or Vue. Hire backend developers who know frameworks such as Django or Flask in and out.

Wrong!

Adding more items to your technology stack will exponentially increase the complexity of your projects. Instead of helping with simplifying things, the new team of experts will have to spend a ton of their time and your data team's time in meetings.

If that's not going to solve the problem, then what will?

Streamlit could!

Streamlit helps data scientists to create web wrappers for their machine learning model in a declarative fashion. All they need is Python which most data scientists use in their everyday tasks.

Before diving in, here's a quickstart tutorial I wrote about Streamlit. I've shared an example where you could train a K-means clustering model by specifying the number of clusters in the UI. This might sound simple, but it's sufficient to teach the basics of Streamlit.

Streamlit basic example

Source code for Streamlit app

Blog post

Here are some awesome example sites created with Streamlit.

1. Game of Thrones Analysis by Mario Vishal.

This visualization interactively shows different insights about popular TV series. You can select your favorite character and the app will tell you interesting facts such as the number of dialogues your selected character has spoken.

Live app

Source code

2. Music Through the Ages by Tanul Mathur

This amazing Streamlit example is helpful for learning the Streamlit layout primitives. It simply devices the section into columns and displays different graphs on each of them.

Live app

Source code

3. Climate Changes Between 1980-2020 by Dan Becker

Maps are perhaps the tricky thing on a web app to add interactiveness. This app is a basic example of how to do precisely that. You can hover over different places to see environmental matrices, and when you click on them, you get to see a time series view of the same.

Live app

Source code

4. Blood Cell Count Object Detection by Matthew Brems

This cool Streamlit app helps differentiate white blood cells and red blood cells from an image of the blood sample. You can set confidence thresholds and overlap thresholds to control the object detection too.

Live app

Source code

5. Commic me by Nathan Nguyen

Comic me is an interesting application that turns an image into a cartoon-like character. This app uses the CycleGAN structure to get it working.

Live app Source code

Related: How I Create Dazzling Dashboards Purely in Python.


Say Hi to me on LinkedIn, Twitter, and Medium. I’ll break the ice for you.

Not a Medium member yet? Please use this link to become a member. You can enjoy thousands of insightful articles and support me as I earn a small commission for referring you.

A blog about data science, machine learning, artificial intelligence, and analytics by Thuwarakesh Murallie.