Spaces:
Running
on
Zero
Running
on
Zero
title: Psychology AI Assistant | |
emoji: π§ | |
colorFrom: purple | |
colorTo: blue | |
sdk: gradio | |
sdk_version: 5.34.2 | |
app_file: app.py | |
pinned: false | |
license: apache-2.0 | |
models: | |
- Qwen/Qwen2.5-0.5B | |
- phxdev/psychology-qwen-0.5b | |
tags: | |
- psychology | |
- mental-health | |
- therapy | |
- counseling | |
- peft | |
- qwen | |
- fine-tuned | |
# π§ Psychology AI Assistant | |
An empathetic AI assistant fine-tuned for psychology and mental health support. Based on Qwen 2.5-0.5B with specialized training using PEFT/LoRA techniques. | |
## β¨ Features | |
- **Empathetic Responses**: Fine-tuned specifically for psychology and mental health conversations | |
- **Multiple Support Styles**: Choose from therapeutic, supportive friend, crisis support, anxiety coaching, or mindfulness guidance | |
- **Evidence-Based Approach**: Responses grounded in psychological principles and therapeutic techniques | |
- **Interactive Interface**: Modern, accessible design with conversation starters and customizable settings | |
- **Privacy-Focused**: No conversation data is stored or logged | |
## π― Model Details | |
- **Base Model**: [Qwen/Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B) | |
- **Fine-tuned Model**: [phxdev/psychology-qwen-0.5b](https://huggingface.co/phxdev/psychology-qwen-0.5b) | |
- **Training Method**: PEFT (Parameter Efficient Fine-Tuning) with LoRA | |
- **Specialization**: Psychology, mental health, therapeutic communication | |
- **Parameters**: ~500M parameters (0.5B) | |
- **Context Length**: 2048 tokens | |
## π How to Use | |
1. **Start a Conversation**: Type your thoughts, concerns, or questions in the chat box | |
2. **Choose Your Style**: Select the type of support you prefer from the dropdown menu | |
3. **Adjust Settings**: Customize response creativity and length to your preference | |
4. **Try Examples**: Click on any of the conversation starters for common scenarios | |
### Support Styles Available: | |
- **π¬ Therapeutic**: Professional therapist approach with validation and structured guidance | |
- **π₯ Supportive Friend**: Warm, caring friend who studied psychology | |
- **π Crisis Support**: Immediate support and grounding techniques for crisis situations | |
- **π° Anxiety Coach**: Specialized techniques for managing anxiety and panic | |
- **π§ Mindfulness Guide**: Present-moment awareness and self-compassion practices | |
## β οΈ Important Disclaimer | |
This AI assistant provides supportive guidance based on psychological principles, but it is **not a replacement for professional therapy or medical advice**. | |
If you're experiencing a mental health crisis, please contact: | |
- **988 Suicide & Crisis Lifeline**: Call or text 988 | |
- **Crisis Text Line**: Text HOME to 741741 | |
- **Emergency Services**: Call 911 (US) or your local emergency number | |
## π οΈ Technical Implementation | |
The model uses advanced prompt engineering and fine-tuning techniques to provide contextually appropriate responses: | |
- **PEFT Training**: Efficient fine-tuning preserving base model capabilities while adding psychology specialization | |
- **Prompt Templates**: Multiple specialized templates for different therapeutic approaches | |
- **Response Quality**: Built-in safeguards against generic or unhelpful responses | |
- **Mobile Optimized**: Responsive design works well on all devices | |
## π¨ Interface Features | |
- **Clean Design**: Modern, calming interface designed for sensitive conversations | |
- **Conversation History**: Full chat history maintained during your session | |
- **Example Prompts**: Curated conversation starters for common mental health topics | |
- **Accessibility**: Screen reader friendly and keyboard navigable | |
- **Privacy**: No data logging or conversation storage | |
## π§ Model Performance | |
The fine-tuned model shows significant improvements over the base Qwen model in: | |
- **Empathy**: Better emotional validation and understanding | |
- **Practical Advice**: More actionable, specific guidance | |
- **Psychological Awareness**: Understanding of mental health concepts and terminology | |
- **Conversational Flow**: Natural, supportive dialogue without generic responses | |
## π Example Use Cases | |
- **Stress Management**: Work stress, academic pressure, life transitions | |
- **Anxiety Support**: Panic attacks, social anxiety, general worry | |
- **Relationship Guidance**: Communication skills, boundary setting, conflict resolution | |
- **Self-Esteem**: Building confidence, overcoming negative self-talk | |
- **Mindfulness**: Present-moment awareness, meditation guidance, self-compassion | |
- **Grief Support**: Processing loss, coping with change | |
## π€ Contributing & Feedback | |
This model is part of ongoing research into AI applications for mental health support. If you have feedback or suggestions: | |
- **Model Issues**: Report on the [model repository](https://huggingface.co/phxdev/psychology-qwen-0.5b) | |
- **Interface Bugs**: Open an issue on this Space | |
- **Research Collaboration**: Contact [@phxdev](https://huggingface.co/phxdev) | |
## π Related Resources | |
- **Base Model**: [Qwen/Qwen2.5-0.5B](https://huggingface.co/Qwen/Qwen2.5-0.5B) | |
- **PEFT Library**: [huggingface/peft](https://github.com/huggingface/peft) | |
- **Mental Health Resources**: [National Alliance on Mental Illness](https://nami.org) | |
## π License | |
This Space and the fine-tuned model are released under the Apache 2.0 License. The base Qwen model follows its original licensing terms. | |
--- | |
**Built with β€οΈ by [@phxdev](https://huggingface.co/phxdev) using Gradio and HuggingFace Transformers** |