--- title: CXR Orchestrator emoji: 🫁 colorFrom: indigo colorTo: gray sdk: docker app_port: 7860 pinned: false short_description: Chest X-ray interpretation, localization & overlays --- # CXR Orchestrator — Hugging Face Docker Space A Chainlit chat frontend for the chest-X-ray agent. Attach a CXR to a message and ask for a read; the agent triages the image, reasons over it with **NV-Reason-CXR-3B** (via an MCP server), localizes findings, and can author an **interactive HTML overlay** that opens in a right-hand dashboard panel. Optional **ElevenLabs** voice narrates the impression inline. Follow-up questions in the same chat reuse the loaded image and any findings or visualizations already produced — no need to re-attach. ## How it works Per chat session the app opens the reasoning MCP connection and provisions one `UnixLocalSandboxClient` workspace (staging the `cxr-overlay` skill), keeping both alive for the session. Each turn runs one agent turn; any HTML the agent writes to the sandbox `output/` directory is collected and surfaced as a selector button + the right-hand panel (plus a downloadable file). If the sandbox can't be provisioned, the app falls back to the base agent for a text-only read. The agent is the model-driven `SandboxAgent` (shell + filesystem). The sandbox capabilities are ordinary function tools, so it runs on **Claude via LiteLLM**. ## Repo layout (Space root) ``` Dockerfile app.py requirements.txt README.md <- this file (HF Docker Space header) chainlit.md .chainlit/config.toml public/elements/OverlayFrame.jsx cxr_agents/ tools/ skills/ models/ sandbox/ ``` ## Secrets (Space → Settings → Secrets) | Name | Required | Purpose | | --- | --- | --- | | `ANTHROPIC_API_KEY` | yes | Claude (orchestrator, via LiteLLM) | | `ELEVENLABS_API_KEY` | no | Voice narration (a free key works) | | `CXR_REASON_MCP_URL` | no | Override the reasoning MCP URL | | `ELEVENLABS_VOICE_ID` | no | Default voice (name or raw ID) | ## Disclaimer Decision support only — **not a diagnostic device**. Always confirm findings with a qualified radiologist.