added semaphore

This commit is contained in:
2026-05-29 19:38:29 +02:00
parent 0ca5df8737
commit 0fba1a8a72
+1
View File
@@ -112,6 +112,7 @@ async def predict_face(websocket: WebSocket):
continue
last = time.time()
with sem_ai:
np_arr = np.frombuffer(jpg_bytes, np.uint8)
frame = cv2.imdecode(np_arr, cv2.IMREAD_COLOR)