Minimal Streamlit apps for the course "Software Tools and Techniques for AI".
Each file adds one new idea, so students can run the versions in order:
pip install -r requirements.txt
streamlit run v1.py
streamlit run v2.py
...
streamlit run v10.pyThe final deployable app is app.py, which imports v10.py.
| File | New idea |
|---|---|
v1.py |
title, text, basic app structure |
v2.py |
text input and button |
v3.py |
slider, selectbox, radio, simple logic |
v4.py |
sidebar, columns, metrics, progress |
v5.py |
dataframe and charts |
v6.py |
file upload and sample CSV download |
v7.py |
text area and simple text analysis |
v8.py |
checkbox, markdown, and LaTeX |
v9.py |
a simple sklearn classifier with cached loading |
v10.py |
a final sklearn app with charts, tabs, upload, markdown, and export |
- Run
v1.pyto show how quickly a web app appears. - Move to
v2.pyto explain reruns and buttons. - Use
v3.pyandv4.pyto cover widgets and layout. - Use
v5.pyandv6.pyfor data display and CSV upload. - Use
v7.pyandv8.pyfor text display, markdown, and math. - Use
v9.pyto show how sklearn fits into a Streamlit app. - End with
v10.py, then deployapp.py.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run app.pyRun Streamlit from the repository root so local paths behave the same way as deployment.
- Streamlit Community Cloud: see
deploy/streamlit-community-cloud.md - Hugging Face Spaces: use the separate
hf-spaces-deploy-tutorialrepo
- The apps stay self-contained so students can open one file and understand it.
- The examples are student-friendly and now include a minimal sklearn model.
- Markdown, LaTeX, checkbox widgets, charts, and CSV upload are all covered before deployment.