Skip to content

shareefat/depression_detection

Repository files navigation

Youth Mental Wellness — PHQ9 + Gemini (Google Generative AI)

Demo app: PHQ-9 questionnaire + optional face detection + Gemini-generated motivational/referral cards.

Files

  • app.py : Streamlit app (questionnaire + camera + Gemini)
  • PHQ9.csv : questions (must have 'question' column)
  • frontal.xml / eye.xml : optional Haar cascades (if missing, fallback to OpenCV builtins)
  • .streamlit/secrets.toml : optional secrets file (DO NOT COMMIT)

Setup (local)

  1. Clone/copy project folder.
  2. Create virtualenv (recommended):
    • python -m venv .venv
    • Activate:
      • mac/linux: source .venv/bin/activate
      • windows: .venv\Scripts\activate
  3. Install dependencies:
    • pip install -r requirements.txt
  4. Set your Google API key (do NOT hardcode in files):
    • mac/linux:
      • export GOOGLE_API_KEY="AIza..."
    • Windows PowerShell:
      • setx GOOGLE_API_KEY "AIza..."
    • Or create .streamlit/secrets.toml with GOOGLE_API_KEY = "..." (do not commit)
  5. Run app:
    • streamlit run app.py
  6. Open the URL printed in terminal (usually http://localhost:8501).

Setup in AI Studio (Notebook style)

Option A (quick & temporary):

  1. In notebook cell:
    import os
    os.environ["GOOGLE_API_KEY"] = "YOUR_GOOGLE_API_KEY"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published