Skip to content

Repository files navigation

CareBridgeAI - AI-Powered Humanitarian Platform

CareBridgeAI is a full-stack humanitarian platform connecting refugees, donors, and NGOs using AI. It features a medical chatbot powered by RAG (Retrieval-Augmented Generation), real-time hospital locator, voice search, and multilingual support.

🌐 Live Demo: https://carebridgeai-peach.vercel.app


πŸ—οΈ Architecture

Frontend  β†’  Vercel               (React + Vite + TailwindCSS)
Backend   β†’  HuggingFace Spaces   (Flask + Gunicorn)
Vector DB β†’  Pinecone             (Medical case embeddings)
LLM       β†’  Groq                 (LLaMA 3.3 70B)

🌍 Platform Features

πŸ€– AI Medical Chatbot (RAG-Powered)

  • Describe your symptoms in any language and get relevant medical advice
  • Uses Retrieval-Augmented Generation (RAG):
    • all-MiniLM-L6-v2 SentenceTransformer converts your query to a vector
    • Pinecone searches 250,000+ medical dialogue embeddings for similar cases
    • Groq LLaMA 3.3 70B generates a professional, empathetic response grounded in real doctor-patient cases
  • Trained on the ruslanmv/ai-medical-chatbot dataset
  • Automatically detects the specialist type needed (General, Dentist, Cardiology, etc.)
  • Always ends with a disclaimer to consult a real doctor

πŸ—ΊοΈ Smart Hospital Locator

  • Automatically recommends nearby hospitals based on your symptoms
  • Uses OpenStreetMap Overpass API to find real medical facilities
  • Supports specialist search: General, Dentist, Pharmacy, Cardiology, Orthopedics, Neurology, Ophthalmology, Dermatology, Pediatrics
  • Falls back to a wider radius if no results found nearby
  • Shows facilities on an interactive Leaflet map with Google Maps directions

🎀 Voice Search

  • Speak your symptoms instead of typing
  • Real-time speech-to-text using Google Speech Recognition
  • Supports multiple languages with auto-detection

πŸ”Š Text-to-Speech

  • Listen to AI responses read aloud
  • Multilingual TTS using gTTS
  • Hover over any bot message and click the speaker icon to hear it

🌐 Multilingual Support

  • Input in any language β€” auto-translated to English for processing
  • Responses delivered back in the detected language
  • Powered by deep-translator

πŸ’ Donor Platform

  • Secure one-time and monthly donation options
  • Real-time impact tracking with progress bars
  • Active causes: Emergency Relief, Education, Healthcare, Housing

🏒 NGO Hub

  • NGO registration and partnership portal
  • Resource management and donor connection tools
  • AI-powered analytics dashboard
  • Verified NGO network across 34 countries

πŸ’‘ Dark/Light Mode

  • Full dark and light theme support across all pages
  • Smooth animated transitions

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React 19 UI Framework
Vite Build Tool
TailwindCSS 4 Styling
React Router DOM Navigation
React Leaflet Interactive Maps
Lucide React Icons
GSAP Navbar Animations

Backend

Technology Purpose
Flask Web Framework
Gunicorn WSGI Server
SentenceTransformers Query Embedding
Pinecone Vector Database
Groq (LLaMA 3.3 70B) LLM Response Generation
gTTS Text-to-Speech
SpeechRecognition Voice-to-Text
deep-translator Multilingual Translation
Pydub + ffmpeg Audio Processing

πŸ“ Project Structure

carebridgeai/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ChatBot.jsx        # AI chatbot + map UI
β”‚   β”‚   β”œβ”€β”€ Navbar.jsx         # Animated navbar
β”‚   β”‚   β”œβ”€β”€ Main.jsx           # Landing page
β”‚   β”‚   β”œβ”€β”€ Donor.jsx          # Donor platform
β”‚   β”‚   β”œβ”€β”€ Ngo.jsx            # NGO hub
β”‚   β”‚   β”œβ”€β”€ About.jsx          # About page
β”‚   β”‚   β”œβ”€β”€ Services.jsx       # Services page
β”‚   β”‚   β”œβ”€β”€ HospitalLocator.jsx# Hospital finder
β”‚   β”‚   └── useLocation.jsx    # Geolocation hook
β”‚   β”œβ”€β”€ App.jsx
β”‚   └── main.jsx
β”œβ”€β”€ chat.py                    # Flask backend (RAG + APIs)
β”œβ”€β”€ main.ipynb                 # Pinecone data upload notebook
β”œβ”€β”€ Dockerfile                 # HuggingFace Spaces deployment
β”œβ”€β”€ requirements.txt
└── README.md

πŸš€ Running Locally

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • Pinecone account
  • Groq API key

Step 1 β€” Clone the Repository

git clone https://github.com/AriseAk/CareBridgeAI.git
cd CareBridgeAI

Step 2 β€” Setup Backend

pip install -r requirements.txt

Create a .env file in the root:

PINECONE_API_KEY=your_pinecone_key
GROQ_API_KEY=your_groq_key

Run the backend:

python chat.py

Step 3 β€” Setup Frontend

npm install

Create a .env file:

VITE_API_URL=http://localhost:5000

Run the frontend:

npm run dev

Step 4 β€” Open in Browser

http://localhost:5173

☁️ Deployment

Frontend β€” Vercel

  1. Connect your GitHub repo to vercel.com
  2. Add environment variable:
VITE_API_URL = https://redinferno1736-carebridgeai-backend.hf.space
  1. Deploy

Backend β€” HuggingFace Spaces

  1. Create a new Space at huggingface.co/spaces
  2. Select Docker β†’ Blank β†’ CPU Basic
  3. Upload chat.py, requirements.txt, Dockerfile
  4. Add secrets in Space Settings:
PINECONE_API_KEY = your_key
GROQ_API_KEY = your_key
  1. Space URL: https://your-username-carebridgeai-backend.hf.space

πŸ—„οΈ Dataset & Embeddings

The RAG system is powered by the ruslanmv/ai-medical-chatbot dataset.

  • Medical dialogues were cleaned, embedded using all-MiniLM-L6-v2
  • Uploaded to Pinecone index medical-bot
  • See main.ipynb for the full data pipeline

Google Colab Training Notebook

Open in Colab

Fine-tuned BART Model (local use only)

Download from Google Drive

Note: The production deployment uses the RAG pipeline (chat.py). The fine-tuned BART model (app.py) is available for local experimentation only.


πŸ‘₯ Team

Name
Prateek Raghavendra
Akshay Bhat
Pranav D P

About

An AI-powered healthcare ecosystem leveraging a scalable RAG pipeline and SciSpaCy for high-precision consultation simulation, facility discovery, and humanitarian resource mapping.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages