Spaces:
Running
Running
|
Download README.md from PediaMedAI/MedCaseAgent: direct link, hf CLI and curl.
- Browser
- Download file 3.68 kB
-
https://huggingface.co/spaces/PediaMedAI/MedCaseAgent/resolve/main/README.md
- Command line
-
hf download hf://spaces/PediaMedAI/MedCaseAgent/README.md
-
curl -L -o README.md https://huggingface.co/spaces/PediaMedAI/MedCaseAgent/resolve/main/README.md
3.68 kB
| title: MedCaseAgent | |
| emoji: 馃搫 | |
| colorFrom: gray | |
| colorTo: gray | |
| sdk: static | |
| app_file: index.html | |
| license: cc-by-nc-4.0 | |
| short_description: Clinical case reports 路 Corpus, benchmark, and agent code | |
| # MedCaseAgent | |
| **From Multimodal Clinical Evidence to Rare Disease Case Reports** | |
| [Open project page](https://huggingface.co/spaces/PediaMedAI/MedCaseAgent) | |
| The project page brings together the three research resources: | |
| - [MedCase-Bench](https://huggingface.co/datasets/PediaMedAI/MedCase-Bench): 584 structured clinical input records for evaluating case-report generation. | |
| - MedCase-150K: a large corpus of clinical case-report metadata, including rare-disease reports. | |
| - [MedCaseAgent code](https://github.com/PediaMedAI/MedCaseAgent): preprocessing, Planner鈥揥riter鈥揈ditor report-generation inference, and the disease retrieval index. | |
| See each repository for its release scope and license. The code's CC BY-NC 4.0 | |
| license restricts commercial use; source publications retain their own licenses. | |
| ## Free static deployment | |
| The published Space uses React + TypeScript + Vite. It reads public JSON snapshots generated from the optional FastAPI backend. The frontend is compiled locally and its built files are uploaded to the Space root, alongside the source code. No hosted build, runtime server, model, token, or paid hardware is needed. | |
| Requires Node.js 22.12+: | |
| ```bash | |
| cd frontend | |
| npm ci --include=dev | |
| npm run build:static | |
| npm run preview -- --host 127.0.0.1 --port 7860 | |
| ``` | |
| Open http://127.0.0.1:7860. The introduction, teaser figure, and resource links work entirely in the browser. | |
| ## Update the public content | |
| Edit `backend/app/content.py`, then export the validated data and rebuild: | |
| ```bash | |
| python -m venv .venv | |
| .venv/bin/pip install -r backend/requirements.txt | |
| .venv/bin/python scripts/export_static.py | |
| cd frontend | |
| npm run build:static | |
| ``` | |
| Commit the updated `frontend/public/api/*.json` along with the source. Only explicit public project and example models are exported; environment variables and credentials are never serialized. | |
| To publish an update, upload the contents of `frontend/dist/` to the root of the | |
| static Space, keeping the directory structure (`index.html`, `assets/`, `api/`, | |
| `teaser.png`, and `teaser.pdf`). | |
| Also upload the changed source files. Do not enable `app_build_command`: hosted | |
| builds may require account credits, while this precompiled deployment is free. | |
| ## Optional FastAPI mode | |
| The complete FastAPI backend remains available for future extensions. After installing the Python requirements, build without the static flag: | |
| ```bash | |
| cd frontend | |
| npm run build | |
| cd .. | |
| .venv/bin/python -m uvicorn app.main:app --app-dir backend --host 127.0.0.1 --port 7860 | |
| ``` | |
| FastAPI serves the built React application and `/api/project`, `/api/example`, and `/api/health` on the same origin. API docs are at `/docs`. For frontend development, run FastAPI on port 8000 and `npm run dev` in `frontend/`; Vite proxies `/api` to port 8000. | |
| The included Dockerfile supports this mode. A Docker Space may require a paid Hugging Face plan; the current published static Space does not use it. | |
| Optional public environment variables used by the backend or export script: | |
| | Variable | Default | Purpose | | |
| | --- | --- | --- | | |
| | `HF_NAMESPACE` | `PediaMedAI` | Account or organization hosting the two datasets. | | |
| | `CODE_URL` | `https://github.com/PediaMedAI/MedCaseAgent` | Agent source repository. | | |
| To change static links, set these when running `scripts/export_static.py` and rebuild. No credential belongs in this repository or in the Space variables. The page does not copy the datasets, host model weights, or accept patient uploads. | |