Skip to content

ishpreet404/Zenify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 AI-Powered Mental Health Support System

A comprehensive, safety-first, and scalable platform leveraging machine learning and generative AI to detect, respond to, and manage mental health risks—while also providing journaling and mood-tracking capabilities.


Table of Contents

  1. Overview
  2. Features
  3. System Architecture
  4. Tech Stack
  5. Key Modules
  6. Installation
  7. Usage
  8. Data Privacy & Compliance
  9. Contributing / Journal
  10. License
  11. Disclaimer
  12. Acknowledgments
  13. Contact

Overview

This system is designed to identify and respond to potential suicide risks in real-time using advanced machine learning classification (TF-IDF and Logistic Regression) and Retrieval Augmented Generation (RAG), integrated with generative models (e.g., GitHub Models API with GPT-4, Claude) to provide empathetic, context-aware responses. In addition to AI-based direct support, it offers a journal and mood tracking feature set for users to record personal reflections and monitor their emotional well-being over time.


Features

  • Automatic Suicide Risk Detection
    Uses a Machine Learning Classification Pipeline (MCP) with TF-IDF and logistic regression to flag concerning user-generated text.

  • Keyword Screening
    Real-time filter for suicide/self-harm keywords to initially flag content for review.

  • RAG (Retrieval Augmented Generation)
    Integration of curated resources and knowledge bases to enhance AI responses with relevant context.

  • Generative AI Support
    Empathetic and context-rich conversations powered by GitHub Models API with access to GPT-4, Claude, and other state-of-the-art models.

  • Admin Dashboard
    A React-based interface for administrators to:

    • Review flagged messages
    • Escalate urgent cases
    • Annotate conversation histories
    • View mood/journal summaries (according to user consent)
  • Mood & Journal Tracking
    Enables users to log daily/weekly moods and maintain private journals with optional sentiment analysis and personal progress charts.

  • Compliance & Audit Logging
    Facilitates compliance with data privacy regulations (GDPR, HIPAA-like requirements for health data).


System Architecture

  1. FastAPI Backend
    • Hosts the classification model, manages user data, handles API routes.
  2. GitHub Models API Integration
    • Powers generative responses using state-of-the-art models like GPT-4 and Claude.
  3. React Admin Dashboard
    • Allows moderators or mental health professionals to review and manage flagged content.

Tech Stack

  • Backend: Python, FastAPI, Scikit-learn, SQLite/PostgreSQL
  • Frontend: React, Material-UI
  • AI APIs: GitHub Models API (GPT-4, Claude, o1)
  • Others: Docker (optional), JWT-based Auth, RESTful Services

Key Modules

  1. MCP Model

    • Preprocessing: Text cleaning & tokenization
    • Feature Extraction: TF-IDF
    • Classifier: Logistic Regression
    • Keyword Matching for initial detection
  2. Mood & Journal Tracking

    • Users can log their mood on a daily/weekly schedule (numeric scale, emoji-based, etc.).
    • A journal for personal reflections—can optionally run sentiment analysis.
    • Trend charts to visualize emotional patterns.
  3. RAG Pipeline

    • Combines AI knowledge retrieval with generative models for context-aware responses.
    • Ideal for referencing relevant mental health resources/articles.
  4. Generative Response Integration

    • Uses GitHub Models API with GPT-4, Claude, and other advanced models to generate empathetic, context-tuned messages.
    • Automatic escalation triggers for high-risk user statements.
  5. Admin Dashboard

    • Secure login for mental health professionals or moderators.
    • Flagged messages review, risk assessment, and escalation.
    • Oversees mood/journal entries (with the user’s permission).
    • Maintains audit logs for compliance.

Installation

  1. Clone the Repository
    git clone https://github.com/your-org/ai-mental-health-support.git
    cd ai-mental-health-support
    

Screenshots

Screenshot (93) Screenshot (97) Screenshot (96) Screenshot (101)

About

Zenify is an AI mental health chatbot using RAG and MCP for personalized support with journaling, mood tracking, and crisis alerts. Runs locally with a soothing, animated UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors