Spaces:
Sleeping
Sleeping
| """Hugging Face Spaces entrypoint for the Mobility Co-Pilot demo. | |
| Thin wrapper that invokes mobility.src.demo.copilot_app_mobility.main with | |
| paths relative to the Space repo root. The full app code lives at | |
| mobility/src/demo/copilot_app_mobility.py. | |
| Four tabs: | |
| - Policyholder Trajectory (live multi-surface inference on auto-discovered cast) | |
| - Ask the Model (text Q&A through frozen LFM2.5 backbone) | |
| - Why this matters (motor insurer 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 at the public LFM2.5 base on the HF Hub. | |
| os.environ.setdefault("MOBILITY_BACKBONE_PATH", "LiquidAI/LFM2.5-350M-Base") | |
| from mobility.src.demo.copilot_app_mobility import main # noqa: E402 | |
| sys.argv = [ | |
| "app", | |
| "--crash-config", "mobility/configs/train_crash_risk_v5_event.yaml", | |
| "--crash-ckpt", "checkpoints/crash_risk_v7_demo.pt", | |
| "--fraud-config", "mobility/configs/train_fraud_event.yaml", | |
| "--fraud-ckpt", "checkpoints/fraud_v6_demo.pt", | |
| "--renewal-config", "mobility/configs/train_renewal_event.yaml", | |
| "--renewal-ckpt", "checkpoints/renewal_v7_demo.pt", | |
| "--cache-dir", "mobility/data/cache", | |
| "--backbone-model-path", os.environ["MOBILITY_BACKBONE_PATH"], | |
| "--device", "cpu", | |
| "--dtype", "float32", | |
| "--port", "7860", | |
| ] | |
| main() | |