Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Social Media Mental Health Score Predictor

An end-to-end Machine Learning web application that analyzes an individual's social media usage habits, sleep patterns, exercise routines, and daily stress levels to predict an overall Mental Health Score (0 - 10).

Built with a FastAPI REST backend, a scikit-learn Machine Learning pipeline, and a modern React + Vite + Tailwind CSS glassmorphism frontend featuring a real-time dynamic semi-circle gauge meter.


✨ Features

  • Real-time Prediction: Calculates mental health scores based on daily screen time, phone unlocks, sleep, study, and physical activity.
  • Interactive Dashboard: Modern dark-mode UI with dynamic semi-circle gauge meter and score evaluation badges (Optimal, Moderate, High Distress Risk).
  • Robust Backend: FastAPI server with strict Pydantic input validation and CORS middleware configured.
  • Decoupled Architecture: Clean separation between Frontend and Backend, supporting environment variables (.env).

🛠️ Tech Stack

Backend:

  • Python 3.12 / 3.13
  • FastAPI (REST API Framework)
  • Scikit-Learn (ML Pipeline & Data Preprocessing)
  • Pandas & Joblib (Data Manipulation & Model Persistence)
  • Uvicorn (ASGI Web Server)

Frontend:

  • React 18 + Vite
  • Tailwind CSS (Styling & Responsive UI)
  • Lucide React (Modern Icon Sets)

📂 Project Structure

MENTAL HEALTH SCORE FROM SOCIAL MEDIA/
│
├── Backend/
│   ├── main.py                     # FastAPI server & prediction routes
│   ├── Mental_Health_Model.pkl     # Trained Scikit-Learn Model Pipeline
│   ├── requirements.txt            # Python dependencies
│   └── .env                        # Backend environment variables
│
└── Frontend/
    ├── src/
    │   ├── components/             # React components (Form & Gauge Meter)
    │   ├── App.jsx                 # Main application component
    │   └── main.jsx
    ├── package.json                # Frontend dependencies & scripts
    ├── .env                        # Vite environment variables (API Base URL)
    └── vite.config.js

About

Social Media Mental Health Score Predictor is a full-stack Machine Learning web application that analyzes digital lifestyle habits—screen usage, phone unlocks, sleep duration, exercise, and stress levels—to predict a personalized Mental Health Score (0–10).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages