--- title: Mental Wellness Assistant emoji: 🧠 colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 5.8.0 app_file: app.py pinned: false license: mit --- # Mental Wellness Assistant A sophisticated AI-powered mental wellness assistant using state-of-the-art Mistral-7B language models. This application provides both therapeutic conversation and mindfulness guidance through an intuitive chat interface. ## Features ### 1. Dual-Agent System - **Therapeutic Agent**: Provides empathetic conversations and emotional support - **Mindfulness Agent**: Offers guided meditation and mindfulness exercises ### 2. Advanced AI Capabilities - Powered by Mistral-7B-Instruct-v0.2 - Context-aware responses - Natural conversation flow ### 3. User Interface - Clean, intuitive chat interface - Easy switching between therapeutic and mindfulness modes - Example prompts for quick start ## Technical Details ### Requirements - Python 3.8+ - CUDA-compatible GPU recommended - 16GB+ RAM recommended ### Key Dependencies - Gradio: Web interface - Transformers: Hugging Face model support - PyTorch: Deep learning framework - Hugging Face Hub: Model hosting and management ### Model Information - Base Model: Mistral-7B-Instruct-v0.2 - Optimization: 16-bit precision for efficiency - Auto device mapping for optimal resource usage ## Usage 1. **Mode Selection** - Choose between "Therapeutic Mode" and "Mindfulness Mode" - Each mode provides specialized responses for different needs 2. **Conversation** - Type your message in the chat interface - Get AI-generated responses based on the selected mode - Use example prompts for guidance 3. **Example Interactions** - "I've been feeling anxious lately" - "Guide me through a breathing exercise" - "I need help managing stress" - "Can you teach me meditation?" ## Important Disclaimers 1. **Not a Medical Service** - This is a demonstration project - Not a substitute for professional mental health care - Seek professional help for serious concerns 2. **Privacy Notice** - Conversations are not stored permanently - Data is processed securely - Use discretion when sharing personal information ## Emergency Resources If you're experiencing a mental health crisis: - Emergency Services: 911 (US) - National Crisis Hotline: 988 - Crisis Text Line: Text HOME to 741741 ## Development ### Local Setup 1. Clone the repository 2. Install dependencies: `pip install -r requirements.txt` 3. Set up HF_TOKEN in environment variables 4. Run: `python app.py` ### Hugging Face Spaces This application is deployed on Hugging Face Spaces and uses: - Gradio SDK - Environment variables for secure token management - Automated logging for monitoring ## License MIT License - Feel free to use and modify with attribution ## Acknowledgments - Mistral AI for the base model - Hugging Face for model hosting and tools - Gradio team for the interface framework