A Streamlit web app for the Human Activity Recognition (HAR) ML pipeline built with custom sklearn transformers + SVM + Optuna hyperparameter tuning.
├── app.py # Streamlit application
├── requirements.txt # Python dependencies
└── README.md
# 1. Install dependencies
pip install -r requirements.txt
# 2. Launch the app
streamlit run app.pyThe app opens at http://localhost:8501.
-
Push to GitHub
git init git add app.py requirements.txt README.md git commit -m "Initial commit" # Create a new repo on github.com, then: git remote add origin https://github.com/<your-username>/<repo-name>.git git push -u origin main
-
Go to share.streamlit.io and sign in with GitHub.
-
Click New app → select your repo → set Main file path to
app.py→ Deploy. -
Your app will be live at
https://<your-app>.streamlit.appin ~2 minutes.
- Create a new Space at huggingface.co/spaces.
- Choose Streamlit as the SDK.
- Upload
app.pyandrequirements.txt. - The Space builds and serves your app automatically.
| Feature | Details |
|---|---|
| File upload | Train + Test CSV via sidebar |
| EDA | Class distribution, correlation matrix, missing/duplicate stats |
| Preprocessing | Configurable variance / correlation / PCA thresholds |
| Hyperparameter tuning | Manual sliders or Optuna (configurable trials) |
| Results | CV accuracy, test accuracy, classification report, confusion matrix |
| Dimensionality report | Feature count at each pipeline stage |
Both CSVs must contain:
- An
Activitycolumn (target label) - Optionally a
subjectcolumn (dropped automatically) - All remaining columns treated as features