Simple Data Science Web App in Python using streamlit


Streamlit is an open-source Python library that makes it easy to build beautiful custom web-apps for machine learning and data science.

Streamlit is an awesome new tool that allows engineers to quickly build highly interactive web applications around their data, machine learning models, and pretty much anything.

The best thing about Streamlit is it doesn’t require any knowledge of web development. If you know Python, you’re good to go!

Follow these steps and to get a sample app running in less than 5 minutes.

  1. You need to have Python 3.6 or greater installed
  2. Install streamlit

Getting Started — Building a Glass Identification Web App

dataset source :-

Attribute Information

  1. Id number: 1 to 214
    RI: refractive index
    Na: Sodium (unit measurement: weight percent in corresponding oxide, as are attributes 4–10)
    Mg: Magnesium
    Al: Aluminum
    Si: Silicon
    K: Potassium
    Ca: Calcium
    Ba: Barium
    Fe: Iron
    Type of glass: (class attribute)
    — building_windows_float_processed
    — building_windows_non_float_processed
    — vehicle_windows_float_processed
    — vehicle_windows_non_float_processed (none in this database)
    — containers
    — tableware
    — headlamps

Getting Started on building the webapp

Add Text Data

st.title is suitable for the main title. We can use specific text functions to add content to your app, or you can use st.write() and add our own markdown.

For section titles, use st.header or st.subheader.

Sample Code for the webapp:

To run your Streamlit app:

Snapshot of Streamlit Webapp

Note : This is an short attempt to build a simple web app using streamlit

Connect with me



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store