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.
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, orHIGH RISK- wellness score (
0-100) - personalized recommendations
The app includes a standard 9-question PHQ-9 form and returns:
- total score (
0-27) - severity band
- guidance text based on score range
- Python
- Flask
- scikit-learn
- NumPy
- Jinja2 templates
- Python 3.8+
pip
pip install -r requirements.txtpython app.pyThen open: http://localhost:5000
- 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.
-
Import/dependency errors
- Reinstall deps with
pip install -r requirements.txt. - Use a clean virtual environment if versions conflict.
- Reinstall deps with
-
Port already in use
- Stop the process using port
5000, or run Flask on a different port.
- Stop the process using port
This diagram shows the full end-to-end flow from browser input to ML inference, PHQ-9 scoring, and unified feedback output.
This screen captures the lifestyle input form used for mental health risk prediction.
This screen shows the model prediction output with wellness score and personalized recommendation.
This screen shows the PHQ-9 questionnaire after responses are selected and before score submission.
This screen shows the computed PHQ-9 score, severity level, and guidance recommendations.