Spaces:
Sleeping
Sleeping
Download scripts/offline_walkthrough.py from REBELLION2002/traffix-live: direct link, hf CLI and curl.
- Browser
- Download file 888 Bytes
-
https://huggingface.co/spaces/REBELLION2002/traffix-live/resolve/main/scripts/offline_walkthrough.py
- Command line
-
hf download hf://spaces/REBELLION2002/traffix-live/scripts/offline_walkthrough.py
-
curl -L -o offline_walkthrough.py https://huggingface.co/spaces/REBELLION2002/traffix-live/resolve/main/scripts/offline_walkthrough.py
888 Bytes
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| def main() -> int: | |
| root = Path(__file__).resolve().parents[1] | |
| evidence = root / "deploy" / "evidence" | |
| manifests = sorted(evidence.glob("**/run_manifest.json")) | |
| if not manifests: | |
| raise SystemExit("No tagged evidence bundle found") | |
| rows = [] | |
| for path in manifests: | |
| manifest = json.loads(path.read_text(encoding="utf-8")) | |
| rows.append( | |
| { | |
| "run_id": manifest.get("run_id"), | |
| "scenario_hash": manifest.get("scenario_hash"), | |
| "status": manifest.get("status"), | |
| "bundle": str(path.parent.relative_to(evidence)), | |
| } | |
| ) | |
| print(json.dumps({"offline": True, "runs": rows}, indent=2)) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |