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 …