Simple Data Science Web App in Python using streamlit

Introduction

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 :-https://archive.ics.uci.edu/ml/datasets/Glass+Identification

Attribute Information

  1. Id number: 1 to 214
    2.
    RI: refractive index
    3.
    Na: Sodium (unit measurement: weight percent in corresponding oxide, as are attributes 4–10)
    4.
    Mg: Magnesium
    5.
    Al: Aluminum
    6.
    Si: Silicon
    7.
    K: Potassium
    8.
    Ca: Calcium
    9.
    Ba: Barium
    10.
    Fe: Iron
    11.
    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