Spaces:
Sleeping
Sleeping
| 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](https://www.iasp.info/resources/Crisis_Centres/) | |
| ## 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 |