Spaces:
Running
Running
Download scripts/export_static.py from PediaMedAI/MedCaseAgent: direct link, hf CLI and curl.
- Browser
- Download file 541 Bytes
-
https://huggingface.co/spaces/PediaMedAI/MedCaseAgent/resolve/main/scripts/export_static.py
- Command line
-
hf download hf://spaces/PediaMedAI/MedCaseAgent/scripts/export_static.py
-
curl -L -o export_static.py https://huggingface.co/spaces/PediaMedAI/MedCaseAgent/resolve/main/scripts/export_static.py
541 Bytes
| """Export validated public content for the free static React deployment.""" | |
| import sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| sys.path.insert(0, str(ROOT / 'backend')) | |
| from app.content import EXAMPLE, PROJECT # noqa: E402 | |
| output = ROOT / 'frontend' / 'public' / 'api' | |
| output.mkdir(parents=True, exist_ok=True) | |
| for name, value in [('project', PROJECT), ('example', EXAMPLE)]: | |
| (output / f'{name}.json').write_text(value.model_dump_json(indent=2) + '\n', encoding='utf-8') | |
| print(f'Exported {name}.json') | |