Skip to content
UPEEC

Streamlit

Build data apps from a Python script — widgets, charts and layouts with minimal code.

Beginner
Comments 0
import streamlit as st
v = st.slider("Supply voltage", 1.0, 12.0, 5.0)
r = st.number_input("Resistance (Ω)", value=220)
st.metric("Current", f"{v / r * 1000:.1f} mA")

Run streamlit run app.py.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.