Mental-Health / README.md
talha13213's picture
added code
3974f08

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
metadata
title: Mental Health Support Assistant
emoji: πŸ’š
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit

Mental Health Support Assistant πŸ’š

A compassionate AI assistant that provides mental health support using Retrieval-Augmented Generation (RAG). This application combines semantic search with AI generation to offer contextually relevant, empathetic responses based on mental health counseling conversation data.

Features

  • Empathetic Responses: Provides supportive, understanding responses to mental health concerns
  • RAG-Powered: Uses vector search to find relevant context from counseling conversations
  • Safety-First: Includes crisis detection and appropriate resource recommendations
  • Professional Boundaries: Clearly states limitations and encourages professional help when needed

How It Works

  1. Data Processing: Mental health counseling conversations are cleaned and embedded using sentence transformers
  2. Vector Search: User queries are matched against the embedded conversation database
  3. Response Generation: OpenAI's GPT model generates empathetic responses based on retrieved context
  4. Safety Measures: Built-in crisis detection and resource recommendations

Important Disclaimer

⚠️ This is an AI assistant for informational and emotional support purposes only. It is not a substitute for professional mental health care, therapy, or medical advice. If you're experiencing a mental health crisis, please contact emergency services or a crisis hotline immediately.

Crisis Resources

  • National Suicide Prevention Lifeline: 988 (US)
  • Crisis Text Line: Text HOME to 741741
  • International: Find local crisis centers

Setup

  1. Set your OpenAI API key in the environment variables or Hugging Face Spaces secrets
  2. Optionally set your Hugging Face token for dataset access
  3. The application will automatically download and process the mental health dataset on first run

Technology Stack

  • Frontend: Gradio
  • Vector Database: ChromaDB
  • Embeddings: Sentence Transformers (all-MiniLM-L6-v2)
  • LLM: OpenAI GPT-3.5-turbo
  • Dataset: Mental Health Counseling Conversations