How sheh0429/water-potability-system works
Sibu AquaML simulates local water readings, sends them to a prediction API, classifies water quality with a Random Forest model, and logs results for dashboard monitoring. The Streamlit dashboard also supports community anomaly reports. Model evaluation is a separate capability that scores the saved model against the supplied dataset. The source excerpts show the main calls and database operations; the Supabase service schema and unsampled model internals are not shown.
Main entry points: evaluate_model.py Model Evaluation · main.py Prediction API · dashboard.py Live Dashboard · random_forest_sibu.pkl Random Forest
Components 11
Reading Ingestion
- Sensor Simulator
simulator.py
Prediction API
- Prediction API
main.py - Random Forest
random_forest_sibu.pkl
Monitoring Dashboard
- Live Dashboard
dashboard.py - Community Reports
dashboard.py
Model Evaluation
- Model Evaluation
evaluate_model.py - Water Dataset
sibu_water_dataset.csv - Evaluation Visualizations
evaluate_model.py
Other components
- Water Readings
- Permai Residents
- Supabase
Connections 11
- Sensor Simulator → Prediction API: posts readings
simulator.py - Prediction API → Random Forest: predicts with
main.py - Prediction API → Water Readings: logs results
main.py - Water Readings → Supabase: stored in
- Live Dashboard → Supabase: queries readings
dashboard.py - Live Dashboard → Water Readings: renders telemetry
dashboard.py - Permai Residents → Community Reports: submit observations
dashboard.py - Community Reports → Supabase: inserts and queries
dashboard.py - Model Evaluation → Random Forest: loads model
evaluate_model.py - Model Evaluation → Water Dataset: loads test data
evaluate_model.py - Model Evaluation → Evaluation Visualizations: generates metrics
evaluate_model.py