How madihakounain/explainable-ai-automl-platform works
This Flask application takes users from CSV upload and dataset exploration through task selection, preprocessing, model benchmarking, and best-model selection, then serves predictions with confidence and explanation results. The upload and training endpoints retain dataset and model artifacts in a session-keyed in-memory store, which the prediction endpoint reads. The dashboard presents exploration, model comparisons, and global and per-prediction explanations. The graph follows the sampled route and ML implementations; dashboard rendering and some frontend request details are based on the README and partial JavaScript excerpt.
Main entry points: train_routes.py Training endpoint · predict_routes.py Prediction endpoint · app.js Web dashboard · upload_routes.py Upload and analysis
Components 19
Web application
- Web dashboard
static/js/app.js - Dashboard template
templates/index.html - Flask app
app.py - Upload and analysis
routes/upload_routes.py - Training endpoint
routes/train_routes.py - Prediction endpoint
routes/predict_routes.py - Session data store
config.py
Dataset preparation
- Task detection
ml/preprocessing.py - Feature preprocessing
ml/preprocessing.py - Target encoding
ml/preprocessing.py - Input row encoding
ml/preprocessing.py
Modeling
- Model benchmarking
ml/automl.py - Global importance
ml/automl.py - Model prediction
routes/predict_routes.py
Explainability
- LIME-style explanation
ml/explainability.py - SHAP-style impact
ml/explainability.py - Narrative summaries
ml/explainability.py - Chart rendering
utils/plotting.py
Other components
- User
Connections 30
- User → Web dashboard: uses
- Flask app → Upload and analysis: registers
- Flask app → Training endpoint: registers
- Flask app → Prediction endpoint: registers
- Web dashboard → Dashboard template: renders
- Web dashboard → Upload and analysis: uploads CSV
- Upload and analysis → Session data store: stores dataset
- Upload and analysis → Chart rendering: renders charts
- Upload and analysis → Web dashboard: returns analysis
- Web dashboard → Training endpoint: requests training
- Training endpoint → Session data store: reads and updates
- Training endpoint → Task detection: detects task
- Training endpoint → Feature preprocessing: prepares features
- Training endpoint → Target encoding: encodes target
- Training endpoint → Model benchmarking: trains candidates
- Model benchmarking → Global importance: selects best model
- Training endpoint → Global importance: computes importance
- Global importance → Chart rendering: renders chart
- Training endpoint → Narrative summaries: summarizes training
- Training endpoint → Web dashboard: returns results
- Web dashboard → Prediction endpoint: submits input
- Prediction endpoint → Session data store: reads artifacts
- Prediction endpoint → Input row encoding: encodes row
- Prediction endpoint → Model prediction: runs model
- Prediction endpoint → LIME-style explanation: explains locally
- Prediction endpoint → SHAP-style impact: estimates impacts
- Prediction endpoint → Narrative summaries: builds narrative
- LIME-style explanation → Chart rendering: renders chart
- SHAP-style impact → Chart rendering: renders chart
- Prediction endpoint → Web dashboard: returns prediction