An end-to-end Machine Learning web application that analyzes and predicts the impact of social media usage habits on student mental health and well-being.
- Machine Learning Pipeline: Trained classification model predicting mental health risk and impact indicators based on social media behavior.
- FastAPI Backend: Fast, lightweight REST API serving real-time model inference.
- Modern Responsive Frontend: Interactive and clean UI for student data input and instant prediction visualization.
├── Mental_Health.ipynb # Model training & EDA notebook
├── Mental_health_model.pkl # Trained Machine Learning model
├── Student Social Media And Mental Health Impact.csv # Dataset
├── main.py # FastAPI server & prediction endpoints
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
└── frontend/ # Web application interface
├── index.html
├── style.css
└── script.js
git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name># Windows
python -m venv venv
venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtuvicorn main:app --reloadThe API will start running at http://127.0.0.1:8000. You can test interactive API documentation at http://127.0.0.1:8000/docs.
Open frontend/index.html in your browser (or use Live Server / any static file server).
The model evaluates features such as daily screen time, social media platform usage, sleep patterns, and academic stress to predict mental health impact scores.