这是indexloc提供的服务,不要输入任何密码
Skip to content

A fully local AI-powered mental health chatbot platform built with DeepSeek R1, leveraging RAG architecture and custom vector indexing. The system runs without external APIs, featuring a React + Vite frontend and a Python + Flask backend.

Notifications You must be signed in to change notification settings

saicharan-balina/MentalBloom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Mental Health Chatbot Platform

📖 Overview

This project is an AI-powered Mental Health Chatbot Platform designed to provide supportive conversations and emotional guidance. It uses a custom-trained vector store to generate context-aware responses without relying on third-party APIs like OpenAI or LangChain.

Instead, the system is built on the DeepSeek R1 model, trained on curated mental health datasets, and implements a custom Retrieval-Augmented Generation (RAG) pipeline developed entirely on Kaggle. The generated embeddings are stored in a serialized file (vector_store.index) and used for fast, relevant retrieval during real-time chatbot interactions.


🧩 Key Features

  • Conversational AI chatbot designed for mental wellness support
  • RAG-based vector store for accurate, context-aware responses
  • Fully custom-built solution with no OpenAI API or LangChain
  • Frontend UI including chatbot, analytics, meditation, and community modules
  • Modular codebase with React + Vite frontend and Python backend

🛠️ Technologies Used

🔹 Backend

  • Python
  • Flask
  • DeepSeek R1 (for embedding generation)
  • FAISS / Custom Vector Store
  • RAG Architecture (developed in Kaggle)
  • No external AI APIs used

🔹 Frontend

  • React
  • Vite
  • JavaScript
  • Tailwind CSS / CSS Modules

🧠 How It Works

1. Vector Store Development

  • Mental health documents (covering anxiety, depression, therapy tips, etc.) were encoded using DeepSeek R1 on Kaggle.
  • These documents were transformed into embeddings and indexed with FAISS.
  • The final serialized index is stored as vector_store.index.

2. Retrieval-Augmented Generation (RAG)

When a user sends a message:

  1. The message is converted into an embedding.
  2. The system searches vector_store.index for similar entries.
  3. Relevant document chunks are retrieved.
  4. A response is generated using this contextual data.

This enables intelligent, accurate, and emotionally sensitive responses without external API calls.


🧱 Architecture Diagram

      ┌────────────────────────────┐
      │     React Frontend (UI)    │
      └────────────┬───────────────┘
                   │
                   ▼
     ┌──────────────────────────────┐
     │    Python Backend (API)      │
     │  - Message Handling          │
     │  - Embedding Lookup          │
     │  - Response Generation       │
     └────────────┬─────────────────┘
                  │
                  ▼
    ┌───────────────────────────────┐
    │     vector_store.index        │
    │  - DeepSeek R1 Embeddings     │
    │  - Trained on Kaggle (RAG)    │
    └───────────────────────────────┘

📂 Folder Structure

mental-health-chatbot/
│
├── backend/
│   ├── mental_health_bot.py
│   ├── requirements.txt
│   └── data/
│       └── vector_store.index
│
├── frontend/
│   ├── public/
│   ├── index.html
│   ├── package.json
│   └── src/
│       ├── components/
│       │   ├── chat/
│       │   ├── ai-assessment/
│       │   ├── meditation/
│       │   ├── analytics/
│       │   ├── community/
│       │   ├── professionals/
│       │   └── settings/
│       ├── routes/
│       └── services/

⚙️ Installation

🐍 Backend Setup

cd backend
pip install -r requirements.txt
python mental_health_bot.py

🌐 Frontend Setup

cd frontend
npm install
npm run dev

🔮 Future Improvements

  • Expand dataset coverage (PTSD, ADHD, grief, etc.)
  • Add emotion detection with visual/audio input
  • Provide multilingual support (Hindi, Spanish, etc.)
  • Deploy full-stack solution on cloud (e.g., Vercel + Render)
  • Integrate secure user login and personalization

🤝 Contributing

Contributions are welcome! Please fork the repository, make changes, and submit a pull request. For major feature proposals, please open an issue for discussion first.

About

A fully local AI-powered mental health chatbot platform built with DeepSeek R1, leveraging RAG architecture and custom vector indexing. The system runs without external APIs, featuring a React + Vite frontend and a Python + Flask backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •