You just developed a cool ML model.

You are proud of it. You want to show it to your friends through a web demo so they can interact with your model and provide feedback.

However, you are not familiar with common frameworks such as Django and Flask.

You start to ask yourself: Is there a way to build a quick web demo with minimal framework?

Table of Curiosities

  1. What is Streamlit?
  2. How to make the UI?
  3. How to create the image classification model?
  4. What does the result look like?
  5. What can we do next?

Overview

In this post, I will walk through a quick example of how you can use **Streamlit **to build a simple web app.

Streamlit is an open-source Python library that makes it easy to build custom web apps for machine learning and data science [1]. Check out its gallery here to see some applications that other people have created.

I have chosen image classification here as an example because computer vision (CV) is one of the most popular areas of AI currently, powered by deep learning algorithms. It also has a wide range of applications, such as classifying medical images to help doctors in disease diagnosis [2].

For demonstration purposes, I will use a pretrained ResNet model from PyTorch, and for the same task, you can always use other libraries (TensorFlow, Keras, etc.), other architecture, or even customize your own model.

To see my full Python code, check out my Github page.

Now without further ado, let’s get started!

#image-classification #streamlit #pytorch #streamlit

Creating an Image Classification Web App using PyTorch and Streamlit
30.35 GEEK