Webify your Data-Driven Projects!-Part 1

Vedanth V Baliga
3 min readMar 8, 2021

Overview

In this blog I am going to show you how to build and deploy the Diamond Price Prediction Application in Streamlit with very few lines of code and for free!

At the end of the 4 part series, you are going to learn how to build an application that predicts the bid price of diamonds!

Why do you need to deploy your data driven projects? 🤔

Let me enlighten you about the importance of deploying an application with a good user interface.

Let’s imagine that you have built a Machine Learning model that predicts lung cancer using a labeled dataset of images that have lung cancer and those that do not have cancer. Once it is trained, we can give a new image to the model and it should be able to predict whether the person has lung cancer or not.

But here is the big question!

Will a doctor be able to modify the code in our IPython notebook or Alteryx workflow and input an image by their own.

In most cases, this is not going to happen 😕 and our work is practically useless if the world cannot benefit from it.

Instead, if we can build a web application where the user(in this case doctor) can drag and drop an image in our application and within seconds he/she should get a response if their patient has lung cancer or not!

This is an easier method for doctors and other layman users to actually use the application!

Now let’s see how we can achieve this🙂

What is Streamlit?

Streamlit is a Python based library whose API helps you to create a frontend interface for your data driven projects fast and with very few lines of code!
The best part, its All in Python and All for Free! You don’t need any frontend experience to work with Streamlit.

Read about Streamlit here.

Installing Streamlit

To install Streamlit the only prerequisite installation you need is Python version 3.7 or below. Using Python 3.8 may cause some issues as Streamlit does not fully support it yet.

Installing Streamlit using pip:

pip install streamlit

To test if streamlit has been installed in your system run in the terminal or command prompt:

streamlit hello

If everything works well, you should see this display on localhost:8501

Streamlit Demo Application

You can select any one of the options from the dropdown and enjoy the demo. 😀

Feel free to drop a comment if you face any difficulties in installing Streamlit or find the solution in the Discussion Forum

That’s all for now folks! Hope you liked the introduction to Streamlit.

Stay tuned for further parts of the Webify Your Data Driven Project! series.

Do check out my other posts as well and connect with me on my social media handles!

--

--

Vedanth V Baliga

Hello World! My name is Vedanth and I am a Computer Science undergrad who loves tech!