Skip to content

Repository files navigation

🧠 Student Social Media & Mental Health Impact Predictor

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.


🚀 Features

  • 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.

📁 Project Structure

├── 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

🛠️ Installation & Setup

1. Clone the repository

git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>

2. Create and activate a virtual environment

# Windows
python -m venv venv
venv\Scripts\activate

# macOS / Linux
python3 -m venv venv
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Run the FastAPI Backend

uvicorn main:app --reload

The 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.

5. Launch the Frontend

Open frontend/index.html in your browser (or use Live Server / any static file server).


📊 Dataset & Model

The model evaluates features such as daily screen time, social media platform usage, sleep patterns, and academic stress to predict mental health impact scores.

About

MindPulse — An end-to-end Machine Learning web application that analyzes and predicts the impact of social media usage, sleep, and lifestyle habits on student mental health using Scikit-Learn, FastAPI, and an interactive modern UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages