--- title: CardioQA AI System emoji: 🫀 colorFrom: blue colorTo: red sdk: docker pinned: false license: mit --- # CardioQA - AI-Powered Cardiac Diagnostic Assistant 🫀 Professional cardiac health assistant powered by **RAG** (Retrieval-Augmented Generation), **ChromaDB**, and **Google Gemini 2.0**. ## 🌟 Features - 🫀 **364+ cardiac medical Q&As** - Comprehensive knowledge base - 🤖 **AI-powered responses** with Google Gemini 2.0 Flash - 🛡️ **Medical safety validation** - Emergency detection & warnings - 📊 **Confidence scoring** - Dynamic response quality metrics - ⚡ **Real-time semantic search** - ChromaDB + Sentence Transformers - 🎯 **Professional safety features** - Medical disclaimers & consultation recommendations ## 🚀 API Endpoints - **`/`** - API information & status - **`/health`** - System health check & database status - **`/query`** - Ask cardiac health questions (POST) - **`/docs`** - Interactive FastAPI documentation - **`/stats`** - System statistics & model information ## 🛠️ Built With - **Backend:** FastAPI + Uvicorn - **AI Model:** Google Gemini 2.0 Flash - **Vector Database:** ChromaDB with persistent storage - **Embeddings:** Sentence Transformers (all-MiniLM-L6-v2) - **Safety:** Custom medical validation system - **Deployment:** Docker + HuggingFace Spaces ## 📊 System Architecture User Query → Semantic Search (ChromaDB) → Context Retrieval → Gemini AI Generation → Safety Validation → Response + Disclaimers ## ⚠️ Medical Disclaimer This system provides **educational information only**. Always consult qualified healthcare professionals for medical advice, diagnosis, or treatment. For medical emergencies, contact emergency services immediately. ## 👨‍💻 Developer Built by **Novonil Basak** - AI/ML Engineer & Biotechnology Student ---