CoolFace
Apppublic

abasu9/RxRAG-MeQSum

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

RxRAG: Agentic Healthcare QA (MeQSum) — Hugging Face Space

A CPU-only Agentic RAG demo for healthcare Q&A using the MeQSum dataset.

  • Frontend: Gradio
  • LLM: tiny local Transformers model (google/flan-t5-small) for low-cost inference
  • Retriever: ChromaDB with all-MiniLM-L6-v2 embeddings
  • Dataset: https://huggingface.co/datasets/abasu9/RxRAG-MeQSum (auto-downloaded on first launch)

How it works

1) On first startup, the Space downloads the dataset repo and scans *.md files. 2) It embeds the docs and builds a Chroma index under data/index/. 3) The Agent pipeline runs: plan → retrieve → draft → reflect → cite, then returns an answer with citations.

Run locally (optional)

bash
pip install -r requirements.txt
python app.py
# then open the Gradio URL printed in the console

Notes

  • To switch models, edit MODEL_NAME in rag/llm_local.py (use a small T5/BART for CPU).
  • If you fork this Space, ensure the dataset stays public or update HF_DATASET_ID in rag/ingest_hf.py.