"""HF Space entrypoint — serves the FastAPI backend + the live static site. Weights are baked into the image at build time (see Dockerfile) from the model repo ``sumitnewold/veridian-lqis`` into ``./models``. This module imports the existing FastAPI app and serves ``static/index.html`` at ``/`` (same-origin, so the page's fetch("/score") hits this server). """ from pathlib import Path from fastapi.responses import FileResponse from src.api.main import app # /score, /analyse, /health, /portfolio/*, CORS _INDEX = Path(__file__).resolve().parent / "static" / "index.html" @app.get("/", include_in_schema=False) def index(): return FileResponse(str(_INDEX))