SOS AI is an advanced mental health assistant designed to provide compassionate support and helpful resources to people dealing with mental health challenges and disabilities. Built with advanced AI, the assistant leverages Google’s Gemini Pro model, natural language processing (NLP), and multilingual support to deliver personalized care, coping strategies, and emergency assistance when needed.
- Emotion Detection: The AI assistant can detect a range of emotions such as sadness, happiness, anger, fear, and loneliness based on user input.
- Sentiment Analysis: Using TextBlob, the assistant can analyze the user's sentiment to determine how positive or negative they are feeling.
- Personalized Coping Strategies: Depending on the user's emotions and inputs, the assistant provides personalized strategies to help users manage stress, anxiety, low self-esteem, and more.
- Real-Time Crisis Support: In critical situations, the assistant immediately offers emergency contact information for mental health helplines.
- Multilingual Support: The assistant supports multiple languages and can seamlessly translate user input, ensuring accessibility for a wider audience.
- Mood Tracking and Analytics: Tracks emotional trends over time to help users understand their mental health progression and provide timely interventions.
- Gemini Pro Integration: Leveraging Google's cutting-edge Gemini Pro model for generating thoughtful and empathetic AI responses.
The assistant can detect specific emotions and analyze the overall sentiment of a user's input to understand their mental state.
- Personalized suggestions to manage mental health challenges.
- Categories include:
- Stress
- Anxiety
- Low Self-Esteem
- Loneliness
- Offers guided techniques like breathing exercises, mindfulness practices, and journaling prompts.
In cases of critical emotional distress, SOS AI offers immediate access to helplines, including:
- AASRA
- Vandrevala Foundation
- iCall
- NIMHANS
- Sneha Foundation
- Detects user language and translates responses using Google Translator.
- Supports real-time translation to ensure accessibility for non-English speakers.
- Tracks user interactions and trends in their emotional health.
- Provides personalized recommendations based on trends and user history.
- Integrates Google’s Gemini Pro AI model to generate empathetic and well-thought-out responses tailored to the user's emotional state.
To run the SOS AI project locally, follow these steps:
git clone https://github.com/yourusername/SOS-AI.git
cd SOS-AI
This project uses pip
to manage dependencies.
pip install -r requirements.txt
You will need a valid API key for Google’s Gemini Pro. Configure the API key by adding it to your environment:
export GOOGLE_API_KEY='your_api_key'
python sos_ai.py
- Google Gemini Pro: For generating empathetic and safe AI responses.
- TextBlob: Sentiment analysis for understanding user emotions.
- Google Translate API: Multilingual translation support.
- Python: Core programming language.
- Natural Language Processing (NLP): For emotion detection and sentiment analysis.
- User Input: The user enters their thoughts or emotions.
- Emotion & Sentiment Analysis: The assistant analyzes the input, detecting emotions and determining the sentiment.
- Personalized Response: Based on detected emotions, the assistant generates a personalized response using Gemini Pro and suggests coping strategies.
- Emergency Handling: If critical distress is detected, the assistant provides helpline contacts for immediate assistance.
- Multilingual Support: Input is automatically translated if the user's language is detected as non-English.
SOS AI keeps track of user emotional trends, such as stress, anxiety, or happiness, and provides insights on how frequently users experience specific emotions. Over time, this data can help users better understand their mental health and take proactive steps towards self-care.
If a user is in distress, SOS AI provides helplines they can call:
- AASRA: +91-9820466726
- Vandrevala Foundation: 1860-2662-345 or 1800-2333-330
- iCall: +91 22-25521111
- NIMHANS: 080-4611 0007
- Sneha Foundation: 044-24640050
We welcome contributions to make SOS AI even better! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
SOS AI is more than just a virtual assistant; it’s a supportive friend that helps users through their toughest moments by offering practical solutions, multilingual support, and real-time assistance. Together, we aim to make mental health care more accessible, empathetic, and effective.
Feel free to explore the code, suggest improvements, or join us on this mission to make a positive impact on mental health and disability support!