Spaces:
Build error
Build error
use sleep instead of log
Browse files- src/utils.py +2 -2
src/utils.py
CHANGED
|
@@ -15,8 +15,8 @@ def start_html_stream(output_frame, lock):
|
|
| 15 |
with lock:
|
| 16 |
if output_frame[0] is None:
|
| 17 |
# TODO: Investigate why if remove this print or time.sleep (but not both at the same time), the stream does not work
|
| 18 |
-
|
| 19 |
-
print(f"{time.time()} - Frame is None.")
|
| 20 |
continue
|
| 21 |
(flag, encoded_image) = cv2.imencode(".jpg", output_frame[0])
|
| 22 |
if not flag:
|
|
|
|
| 15 |
with lock:
|
| 16 |
if output_frame[0] is None:
|
| 17 |
# TODO: Investigate why if remove this print or time.sleep (but not both at the same time), the stream does not work
|
| 18 |
+
time.sleep(0.2)
|
| 19 |
+
# print(f"{time.time()} - Frame is None.")
|
| 20 |
continue
|
| 21 |
(flag, encoded_image) = cv2.imencode(".jpg", output_frame[0])
|
| 22 |
if not flag:
|