Spaces:
Sleeping

sagardeswal Claude Opus 4.7 (1M context) commited on
Commit
85aa55f
·
1 Parent(s): 41d8ccf

fix(card-ocr): add GET / handler for HF Spaces edge healthcheck

Browse files

HF's edge probes GET / on every Space to decide whether it's
'running'. Our FastAPI app exposed /health and /extract but no root
route, so the probe got 404, HF marked the Space unhealthy, and
killed the container after the 30-min grace window:

Launch timed out, workload was not healthy after 30 min
INFO: Started server process [1]
INFO: Uvicorn running on http://[::]:7860
INFO: Shutting down

Add a GET / handler returning the same {ok: true} shape so the
probe passes and the Space stays up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1 file changed +9
main.py+9