added semaphore
This commit is contained in:
@@ -112,6 +112,7 @@ async def predict_face(websocket: WebSocket):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
last = time.time()
|
last = time.time()
|
||||||
|
with sem_ai:
|
||||||
|
|
||||||
np_arr = np.frombuffer(jpg_bytes, np.uint8)
|
np_arr = np.frombuffer(jpg_bytes, np.uint8)
|
||||||
frame = cv2.imdecode(np_arr, cv2.IMREAD_COLOR)
|
frame = cv2.imdecode(np_arr, cv2.IMREAD_COLOR)
|
||||||
|
|||||||
Reference in New Issue
Block a user