Streamlit

1.55.0 · active · verified Sat Mar 28

Streamlit is an open-source Python library that empowers developers to build and share interactive web applications for data science and machine learning with minimal code. It allows transforming Python scripts into beautiful, interactive apps in minutes, supporting various data libraries and visualizations. The current stable version is 1.55.0, with a regular release cadence bringing new features and improvements.

Warnings

Install

Imports

Quickstart

This simple Streamlit app demonstrates how to create a title, a text input widget, and a slider. When a user interacts with a widget, Streamlit automatically reruns the script from top to bottom, updating the displayed output.

import streamlit as st

st.title('My First Streamlit App')

name = st.text_input('What is your name?')

if name:
    st.write(f'Hello, {name}!')

number = st.slider('Choose a number', 0, 100, 50)
st.write(f'The number is {number}')

# To run this app, save it as a .py file (e.g., app.py) and run `streamlit run app.py` in your terminal.

view raw JSON →