--- title: AI Diagnostics Agent - Early Cancer Discovery emoji: ๐Ÿฅ colorFrom: purple colorTo: pink sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false --- # ๐Ÿฅ AI Diagnostics Agent: Early Cancer Discovery (Demo) [![Made with Python](https://img.shields.io/badge/Made%20with-Python-3776AB?logo=python&logoColor=white)](https://www.python.org/) [![Powered by Moonshot.ai](https://img.shields.io/badge/Powered%20by-Moonshot.ai-blue)](https://moonshot.ai) [![Gradio App](https://img.shields.io/badge/Gradio-5.44.0-orange)](https://gradio.app/) โš ๏ธ **Research Demo Only โ€” Not for Clinical Use** --- ## ๐ŸŒ Overview **AI Diagnostics (POC)** is a research project designed to demonstrate early cancer risk screening using **AI-driven imaging + lab report synthesis**. It integrates: - ๐Ÿ–ผ๏ธ **Imaging Agent** โ€” Detects lung abnormalities (mass, opacity, nodules) from chest X-rays. - ๐Ÿงช **Lab Agent** โ€” Parses tumor markers (PSA, CA-125, AFP) and highlights abnormal results. - ๐Ÿง  **AI Coordinator** โ€” Generates diagnostic summaries powered by **Moonshot.ai** with a local **T5 fallback** for offline use. - ๐Ÿ”ฅ **Heatmap Overlay** โ€” Highlights model-identified lung regions for interpretability. --- ## โš™๏ธ Features | Agent | Description | |--------|--------------| | **Imaging Agent** | TorchXRayVision + PyTorch for lung-related cancer indicators | | **Lab Agent** | Extracts structured tumor marker insights | | **Coordinator** | Combines both into concise AI summaries (Moonshot.ai LLM) | | **Fallback AI** | Local text generation using T5-small if network/API fails | | **Heatmap Overlay** | Visual interpretability of X-ray activations | | **Gradio UI** | Easy drag-and-drop web interface for demos | --- ## ๐Ÿง  How It Works 1. Upload or select a sample chest X-ray. 2. Paste lab or MRI/CT report text. 3. The AI analyzes the image + text. 4. Results are combined into a natural-language diagnostic summary. --- ## ๐Ÿš€ Run Locally ```bash git clone https://github.com//ai_diagnostics.git cd ai_diagnostics pip install -r requirements.txt python app.py