NLP-RAG / backend /routes /health.py
Qar-Raz's picture
hf-space: deploy branch without frontend/data/results
c7256ee
raw
history blame contribute delete
273 Bytes
from fastapi import APIRouter
from backend.state import REQUIRED_STATE_KEYS, state
router = APIRouter()
@router.get("/health")
def health() -> dict[str, str]:
ready = all(k in state for k in REQUIRED_STATE_KEYS)
return {"status": "ok" if ready else "starting"}