Download backend/vision_ci_stub.py from SolutionChallenge/solution_challenge_backend: direct link, hf CLI and curl.
- Browser
- Download file 660 Bytes
-
https://huggingface.co/spaces/SolutionChallenge/solution_challenge_backend/resolve/main/backend/vision_ci_stub.py
- Command line
-
hf download hf://spaces/SolutionChallenge/solution_challenge_backend/backend/vision_ci_stub.py
-
curl -L -o vision_ci_stub.py https://huggingface.co/spaces/SolutionChallenge/solution_challenge_backend/resolve/main/backend/vision_ci_stub.py
660 Bytes
| """Lightweight face-engine stub for CI (no InsightFace / ONNX load).""" | |
| from __future__ import annotations | |
| import threading | |
| from typing import Any | |
| import numpy as np | |
| class StubFaceEngine: | |
| app = None | |
| lock = threading.Lock() | |
| def __init__(self): | |
| self.db: dict[str, np.ndarray] = {} | |
| def reload_db(self) -> None: | |
| with self.lock: | |
| self.db = {} | |
| def match_frame(self, frame: np.ndarray, threshold: float | None = None) -> dict[str, Any]: | |
| return {"found": False, "reason": "CI stub — face recognition disabled in CI"} | |
| def recognize(self, frame: np.ndarray) -> list[dict[str, Any]]: | |
| return [] | |