Drakenbourne's picture
Update README.md
6e3b6db verified

Mental Health AI Chatbot

Overview

This AI-powered chatbot provides emotional support and mental health guidance through context-aware conversations. It is fine-tuned on mental health counseling conversations to ensure compassionate and relevant responses.

Features

  • Emotion Detection & Sentiment Analysis β†’ Adjusts responses based on detected user emotions.
  • Context-Aware Conversations β†’ Remembers past interactions for coherent discussions.
  • Journal Mood Pattern Analysis β†’ Tracks mood trends over time.
  • Moderation & Toxicity Filtering β†’ Ensures safe and ethical interactions.
  • Emergency Contact Redirection β†’ Provides immediate help when distress signals are detected.
  • Optimized Model Performance β†’ Uses LoRA and 4-bit quantization for efficiency.
  • Hosted on RTX 4090 β†’ Faster checkpoint downloads and improved inference speed.

Model Training Details

  • Base Model β†’ Fine-tuned LLaMA-2 for mental health counseling.
  • Training Framework β†’ PyTorch, Hugging Face Transformers.
  • Optimization Techniques β†’ LoRA, 4-bit quantization.
  • Dataset Used β†’ Custom dataset of mental health counseling conversations.
  • Training Environment β†’ Google Colab with GPU support & RTX 4090 desktop for inference acceleration.

How to Run on Google Colab

  • Open Google Colab: Go to Google Colab

    • Upload the Notebook:
    • Click on File β†’ Upload Notebook
    • Select GoatedModel_MHB.ipynb from your local storage. (It can be downloaded from the 'Files and Versions' tab of our Hugging Face repo.)
  • Enable GPU:

    • Click on Runtime β†’ Change runtime type
    • Set Hardware accelerator to GPU.
  • Run the Notebook:

    • Execute all cells sequentially.
    • The model will be downloaded, set up, and ready for interaction.

Usage

  • The chatbot runs interactively in the Colab notebook.
  • Users can enter queries, and the model will generate responses accordingly.
  • Outputs can be analyzed for emotional insights and response quality.

Dependencies

  • The notebook automatically installs required dependencies, but ensure the following packages are installed if needed:
  • !pip install torch transformers unsloth langchain llama-index

Future Enhancements

  • Adding voice-based interactions.
  • Integrating mindfulness and relaxation exercises.
  • AI-powered therapy mode selection (CBT, mindfulness, etc.).

Notes

  • This chatbot is not a substitute for professional mental health support.
  • Ensure ethical usage and refrain from using the bot for harmful purposes.

Repository Links

Acknowledgments

  • Built with Hugging Face Transformers and PyTorch.
  • Developed by Siddharth Amdal/Swapnil Patidar with optimization for efficient AI-based counseling.

For any issues or contributions, feel free to open a pull request or contact us!