Fix app.py
Browse files
app.py
CHANGED
|
@@ -318,10 +318,12 @@ def app_object_detection():
|
|
| 318 |
# in different threads asynchronously.
|
| 319 |
# Then the rendered video frames and the labels displayed here
|
| 320 |
# are not strictly synchronized.
|
| 321 |
-
|
| 322 |
-
|
| 323 |
result = webrtc_ctx.video_transformer.result_queue.get()
|
| 324 |
labels_placeholder.table(result)
|
|
|
|
|
|
|
| 325 |
|
| 326 |
st.markdown(
|
| 327 |
"This demo uses a model and code from "
|
|
|
|
| 318 |
# in different threads asynchronously.
|
| 319 |
# Then the rendered video frames and the labels displayed here
|
| 320 |
# are not strictly synchronized.
|
| 321 |
+
while True:
|
| 322 |
+
if webrtc_ctx.video_transformer:
|
| 323 |
result = webrtc_ctx.video_transformer.result_queue.get()
|
| 324 |
labels_placeholder.table(result)
|
| 325 |
+
else:
|
| 326 |
+
break
|
| 327 |
|
| 328 |
st.markdown(
|
| 329 |
"This demo uses a model and code from "
|