This is a machine learning-powered web application built with Python, Flask, and SHAP, designed to screen for Depression, Anxiety, and Stress using the standardized DASS-42 questionnaire. It provides explainable AI (XAI) outputs, user history, interactive plots, and bilingual (English/Sinhala) support.
# π§ AI-Based Mental Health Screening System
This is a machine learning-powered web application built with **Python, Flask, and SHAP**, designed to screen for **Depression, Anxiety, and Stress** using the standardized **DASS-42** questionnaire. It provides **explainable AI (XAI)** outputs, user history, interactive plots, and **bilingual (English/Sinhala)** support.
---
## π Features
- Predicts **Depression, Anxiety, and Stress** severity levels (Normal / Moderate / Severe).
- Built with **Logistic Regression** and SHAP for transparent predictions.
- Clean and bilingual UI with **light/dark mode** and responsive design.
- Supports **anonymous** mode or **registered accounts** with history tracking.
- Interactive **plots** for trends over time using Plotly.
- Personalized **tips & recommendations** based on results.
- Admin panel for **content management** and **system logs**.
---
## π©Ί Input Parameters
- DASS-42 questionnaire responses (42 questions)
- User account details (if registered)
---
## π§° Technologies Used
- **Python** β Core development
- **Flask** β Web application framework
- **Pandas, NumPy, Scikit-learn** β Data processing & ML model training
- **SHAP** β Explainable AI visualizations
- **Plotly** β Interactive plots and graphs
- **HTML, CSS, Bootstrap** β Frontend UI
- **Pickle, JSON** β Model & metadata storage
---
## π Files Included
- `app.py` β Flask app entry point
- `templates/` β HTML templates for pages (home, login, assessment, results, history, tips, admin)
- `static/` β CSS, JavaScript, and images for frontend styling
- `pickle files` β Pickled ML models (`depression.pkl`, `anxiety.pkl`, `stress.pkl`)
- `scaler.pkl` β Preprocessing scaler for consistent inputs
- `dass42_questions.json` β Questionnaire text in English & Sinhala
- `requirements.txt` β Project dependencies
- `README.md` β Project documentation
- `ML_Model.ipynb` β Jupyter notebook for training models
---
## βοΈ Installation & Setup
1. Clone the repository:
```bash
git β¦