Spaces:
Sleeping
Sleeping
| """Hugging Face Spaces entrypoint for the Claims Co-Pilot demo. | |
| Thin wrapper that invokes claims.src.demo.copilot_app_claims.main with | |
| paths relative to the Space repo root. The full app code lives at | |
| claims/src/demo/copilot_app_claims.py. | |
| Three tabs: | |
| - Claimant Trajectory (live multi-surface inference on a curated cast) | |
| - Why this matters for payers (US health-payer P&L vocabulary) | |
| - How this fits your stack (VPC, MCP, license-architecture-not-hosted) | |
| """ | |
| import os | |
| import sys | |
| from pathlib import Path | |
| # Make the bundled source tree importable. | |
| HERE = Path(__file__).parent | |
| sys.path.insert(0, str(HERE)) | |
| # Point the inference module at the public LFM2 base on the HF Hub. The | |
| # Spaces runner can `from_pretrained()` this id directly; no local download | |
| # step needed. | |
| os.environ.setdefault("CLAIMS_BACKBONE_PATH", "LiquidAI/LFM2.5-350M-Base") | |
| from claims.src.demo.copilot_app_claims import main # noqa: E402 | |
| sys.argv = [ | |
| "app", | |
| "--admission-config", "claims/configs/train_admission_h100_v3.yaml", | |
| "--admission-ckpt", "checkpoints/admission_v3_demo.pt", | |
| "--next-event-config", "claims/configs/train_next_event_h100.yaml", | |
| "--next-event-ckpt", "checkpoints/next_event_v1_demo.pt", | |
| "--fraud-config", "claims/configs/train_fraud_h100.yaml", | |
| "--fraud-ckpt", "checkpoints/fraud_v1_demo.pt", | |
| "--cache-dir", "claims/data/cache_demo", | |
| "--cast-path", "claims/data/admission_cast_v2.json", | |
| "--tokenizer-state", "claims/data/tokenizer_state.json", | |
| "--backbone-model-path", os.environ["CLAIMS_BACKBONE_PATH"], | |
| "--device", "cpu", | |
| "--dtype", "float32", | |
| "--port", "7860", | |
| ] | |
| main() | |