Generative AI for Personalized Mental Health Recommendations

Inspiration

Our project, "Generative AI for Personalized Mental Health Recommendations," was inspired by the urgent need for accessible, individualized mental health support. Mental health issues are diverse and deeply personal, making one-size-fits-all solutions insufficient. According to the World Health Organization (WHO), over 700,000 people die by suicide annually, making it a leading cause of death globally. Factors such as stigma, lack of resources, and long waiting times for professional help exacerbate this crisis. Our mission is to enhance mental health care accessibility and effectiveness by offering relevant, responsive, and personalized support through generative AI.


What It Does

The Generative AI for Personalized Mental Health Recommendations application offers tailored mental health support by analyzing users' mood assessments, behavioral patterns, and self-reported data. Key features include:

  • Customized Coping Strategies: Real-time recommendations adapt to users' evolving needs.
  • Resources and Advice: Suggestions for mental health exercises, tools, and reading materials.
  • Interactive Support: An AI chatbot provides meaningful conversations and emotional assistance.

By delivering timely and personalized guidance, the platform empowers users to better manage their mental well-being.


Project Description

This application, built with a customizable Gradio Chat app, includes features such as:

  • Multi-Model Selection: Choose from various AI models based on needs.
  • Download NLP Models Locally: Use Hugging Face models offline for added privacy.
  • Enhanced Chat Interface: Automatic audio responses and pre-defined message templates.
  • Speech Interface: Record or upload audio messages for seamless interaction.

Tested Models

Model Name Model Type Inference Mode Model Description
GTP4-32K NLP gradio api Open AI GPT4-32K (Azure OpenAI API)
gpt4 NLP gradio api Open AI GPT4 (Azure OpenAI API)
gpt4o NLP gradio api OpenAI GPT4o latest model (Azure OpenAI API)
GPT35_TURBO NLP gradio api OpenAI GPT35_TURBO (Azure OpenAI API)

Note: The models listed in Table 1 are tested and verified to work with the application. You can also choose any text generation model that supports transformers on hugging face. Some models downloaded will not be compatible with the version of pytorch Sage is running


System Requirements

vRAM RAM Disk vCPU GPU
32 GB 16 GB 70 GB Intel Core i7 At least 2 GPUs (optional)

How We Built It

  1. Backend: Developed with FastAPI for scalability and robustness.
  2. Frontend: Built with Gradio for a user-friendly, accessible interface.
  3. AI Models: Integrated generative AI models deployed with NVIDIA AI Workbench for efficient resource management.

Feature Highlights

1. Multi-Model Selection

  • What It Does: Allows users to choose from multiple AI models based on their needs.
  • Benefits: Offers flexibility, improved model accuracy, and seamless switching between models.

2. Download and Use NLP Models Locally

  • How It Works:
    • Visit the Hugging Face Model Hub.
    • Copy the full name of model eg. google/gemma-2-2b-it
    • Download & Integrate it into the application for local use.
  • Benefits: Enhances privacy, enables offline use, and supports customized environments.

3. Improved Chat Interface with Audio Responses

  • Features: Automatic text-to-speech for hands-free interaction.
  • Benefits: Increases accessibility and provides auditory feedback.

4. Pre-Defined Messages

  • What It Does: Offers ready-to-use templates for common interactions.
  • Benefits: Saves time and promotes consistent communication.

5. Speech Interface

  • How It Works:
    1. Record or upload audio messages.
    2. Transcribe the message into text for processing.
    3. Convert AI-generated responses back into audio.
  • Benefits: Ideal for conversational, hands-free user experiences.

Challenges We Faced

1. Data Privacy and Security

  • Challenge: Protecting sensitive user data.
  • Solution: Implemented encryption, anonymization, and regular security audits.

2. Model Accuracy and Sensitivity

  • Challenge: Ensuring accurate and empathetic responses.
  • Solution: Fine-tuned models using domain-specific data with input from mental health professionals.

3. Real-Time Processing

  • Challenge: Maintaining performance with real-time backend processing.
  • Solution: Optimized with asynchronous processing and caching.

4. User-Friendly Interface

  • Challenge: Designing an intuitive UI.
  • Solution: Conducted user testing and iterative improvements.

5. Integration with NVIDIA AI Workbench

  • Challenge: Ensuring smooth integration.
  • Solution: Worked with NVIDIA support to resolve compatibility issues.

Accomplishments

  • Functional Prototype: Delivered a working, AI-powered mental health support system.
  • Enhanced Security: Achieved robust data protection standards.
  • Collaborative Success: Worked with experts to refine the application.
  • Real-Time Support: Provided personalized recommendations with minimal delay.

Lessons Learned

  1. Balancing Privacy and Functionality: Prioritized user confidentiality without compromising features.
  2. Iterative Development: Used feedback-driven improvements to align with user needs.
  3. Collaboration: Leveraged expertise for scientifically sound solutions.
  4. Adaptability: Addressed technical challenges with innovative solutions.

Future Plans

  1. Feature Expansion:
    • Real-time mood tracking.
    • Integration with wearable devices.
  2. Model Refinement: Enhance AI accuracy through ongoing research and feedback.
  3. Scaling and Partnerships: Collaborate with mental health organizations and scale for broader impact.
  4. Continuous Improvement: Ensure the platform evolves with user needs and technological advances.

By focusing on these areas, Sage will continue to be a reliable and empathetic mental health companion for all users.

Built With

  • gpt
  • gradio
  • keras
  • nvidia-workbench
  • openai
  • python
Share this project:

Updates