Skip to content

gitXsingh/EmoS

Repository files navigation

EmoS

EmoS is a Flask-based mental wellness web app with two core flows:

  • Mental health risk prediction from lifestyle inputs
  • PHQ-9 depression screening with score-based guidance

The app combines a trained ML model (for risk classification) with rule-based wellness recommendations.

What This Project Does

1) Mental health risk prediction

Users submit:

  • sleep duration and sleep quality
  • stress level
  • activity level
  • heart rate and daily steps
  • screen time and social interaction
  • mood swings

The backend engineers additional features, scales them, runs model inference, and returns:

  • LOW RISK, MODERATE RISK, or HIGH RISK
  • wellness score (0-100)
  • personalized recommendations

2) PHQ-9 screening

The app includes a standard 9-question PHQ-9 form and returns:

  • total score (0-27)
  • severity band
  • guidance text based on score range

Tech Stack

  • Python
  • Flask
  • scikit-learn
  • NumPy
  • Jinja2 templates

Setup

Prerequisites

  • Python 3.8+
  • pip

Install

pip install -r requirements.txt

Run

python app.py

Then open: http://localhost:5000

Notes and Limitations

  • This project is for educational/prototyping use.
  • Outputs are not a clinical diagnosis.
  • PHQ-9 results should not replace professional care.

If someone is in immediate danger or crisis, contact local emergency services or a crisis helpline right away.

Troubleshooting

  • Import/dependency errors

    • Reinstall deps with pip install -r requirements.txt.
    • Use a clean virtual environment if versions conflict.
  • Port already in use

    • Stop the process using port 5000, or run Flask on a different port.

Screenshots and Diagram

1) System Flow Diagram

This diagram shows the full end-to-end flow from browser input to ML inference, PHQ-9 scoring, and unified feedback output. EmoS End-to-End System Flow Diagram

2) Home Prediction Form

This screen captures the lifestyle input form used for mental health risk prediction. Home Prediction Form

3) Prediction Result (Low Risk)

This screen shows the model prediction output with wellness score and personalized recommendation. Prediction Result Low Risk

4) PHQ-9 Form (Completed Inputs)

This screen shows the PHQ-9 questionnaire after responses are selected and before score submission. PHQ-9 Form Complete Filled

5) PHQ-9 Result

This screen shows the computed PHQ-9 score, severity level, and guidance recommendations. PHQ-9 Result Mild Depression

About

EmoS is a modern, full-stack machine learning web app for mental health risk prediction and PHQ-9 depression screening. It features a beautiful Claude-inspired UI with glassmorphism, dark mode, and a responsive design. Built with Python and Flask, it uses a trained Random Forest model to provide personalized wellness recommendations.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages