nihalbarcin/mental-health-depression-prediction-ml
0
Mental Health & Depression Prediction
This Hugging Face Space deploys a trained ensemble model for mental health and depression risk prediction with Streamlit + Docker.
Project Structure
.
├── Dockerfile
├── requirements.txt
├── README.md
└── src
├── depression_model.pkl
└── streamlit_app.pyIncluded Files
src/streamlit_app.py→ Streamlit user interface and prediction pipelinesrc/depression_model.pkl→ Saved model and preprocessing artifactsrequirements.txt→ Python dependenciesDockerfile→ Docker-based deployment for Hugging Face Spaces
How the app works
The app:
- Loads the saved model and encoder artifacts from
depression_model.pkl - Accepts user inputs from a clean Streamlit form
- Rebuilds engineered features used during training
- Runs prediction and, when available, prediction probability
Notes
- The model file contains a
VotingClassifierensemble. - The app includes safe fallbacks for encoded categorical values.
- This is an educational demo and not a medical diagnostic tool.
Run locally
pip install -r requirements.txt
streamlit run src/streamlit_app.pyDeploy on Hugging Face
Upload these files exactly in this structure:
.
├── Dockerfile
├── requirements.txt
├── README.md
└── src
├── depression_model.pkl
└── streamlit_app.pyThe Space will build automatically after upload.
