# EmpathRAG — Slim runtime dependencies # # These are the packages the live Gradio demo and the Hugging Face Space # actually import at runtime. For the full training/baseline stack # (RoBERTa, DeBERTa, Mistral, FAISS, etc.), use requirements-dev.txt. # Demo UI gradio==4.44.1 # gradio 4.44.1 still imports HfFolder, which was removed in huggingface_hub 1.0. # Pin to the 0.x line so the resolver does not pull 1.x from the HF Spaces base # image (which installs huggingface_hub>=0.30 with no upper bound). huggingface_hub>=0.30,<1.0 # Pydantic 2.11+ emits JSON schemas with `additionalProperties: true` (boolean), # which the gradio_client 1.3.0 bundled with gradio 4.44.1 cannot parse — it # crashes with "TypeError: argument of type 'bool' is not iterable" the first # time the API info endpoint is hit. Pinning to 2.10.6 keeps schemas as dicts. pydantic==2.10.6 # Starlette 1.0 dropped the old `TemplateResponse(name, context)` positional # signature in favor of `TemplateResponse(request, name, context)`. Gradio # 4.44.1 still calls the old signature, so the context dict gets passed as # the template name and jinja2 raises "unhashable type: 'dict'". Pin both # fastapi and starlette to versions matching what gradio 4.44.1 was tested on. fastapi==0.115.5 starlette==0.41.3 # Hybrid route classifier (TF-IDF + logistic regression). # Loose lower bounds so the resolver picks wheels compatible with the # Python version configured in the README YAML (currently 3.10). scikit-learn>=1.3,<2.0 scipy>=1.11,<2.0 numpy>=1.26,<3.0 # Tabular utilities pandas>=2.0,<3.0 # Support-plan PDF export (uses bundled DejaVu font for Unicode) fpdf2==2.8.4 matplotlib>=3.7,<4.0 # Local development convenience (.env loading) python-dotenv>=1.0 # HTTP client (Groq + Anthropic API calls) requests>=2.31 # Progress bars (used by some scripts) tqdm>=4.67