A production-ready machine learning system for predicting photovoltaic (PV) power output using temperature and irradiance.
This project combines:
- end-to-end ML pipeline design
- experiment tracking with MLflow
- modular architecture using
src/layout - a deployable Flask web application
- modern dependency management with uv
🌍 Live Demo
- Predict PV power output from environmental inputs
- Experiment tracking and model versioning (MLflow)
- Clean project structure (
src/,scripts/,config/) - Web interface (Flask) with dark mode UI
- Reproducible environment (uv)
- Data is loaded from
data/raw/ - Features (temperature, irradiance) are scaled using
StandardScaler - A neural network (
MLPRegressor) is trained - Experiments are logged with MLflow
- The trained model is saved in
outputs/models/ - Flask app loads the model and serves predictions
In brief:
Input (Temp, Irradiance)
↓
Feature Scaling
↓
MLPRegressor Model
↓
MLflow Tracking
↓
Saved Model (outputs/)
↓
Flask App → Prediction UI
pv-predictor/
├── app/ # Flask web app
├── config/ # YAML configs
├── data/raw/ # input dataset
├── mlruns/ # MLflow experiments (ignored in prod)
├── outputs/models/ # trained model + scaler
├── scripts/ # training pipeline
├── src/pv_predictor/ # core ML logic
├── notebooks/ # exploration
├── pyproject.toml # dependencies (uv)
└── README.mduv syncpython scripts/02_train_model.pymlflow uiThen open: http://localhost:5000
python app/app.pyVisit: http://127.0.0.1:5001
This app can be deployed on:
- Render (recommended for Flask apps)
- Streamlit (for dashboard-style apps)
gunicorn app.app:app --bind 0.0.0.0:$PORT- Python (Flask, scikit-learn, pandas, NumPy)
- MLflow (experiment tracking)
- uv (dependency management)
- HTML/CSS (custom UI with dark mode)
- Add PV performance metrics (PR, efficiency)
- Integrate anomaly detection (UMAP, LOF)
- Forecasting (LSTM / sklearn)
- Build interactive dashboard (Streamlit)
- Load models directly from MLflow registry
Input: Temperature = 25°C Irradiance = 800 W/m²
Output: Predicted Power ≈ 0.82 kW
- v1 (Prototype): Simple Flask app with static model
- v2 (Current): Full ML system with:
- modular pipeline (
src/) - experiment tracking (MLflow)
- reproducible environment (uv)
- production-ready deployment
- modular pipeline (
Built as part of a machine learning + photovoltaic systems project.
