Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -213,8 +213,11 @@ with gr.Blocks() as demo:
|
|
213 |
outputs=None
|
214 |
)
|
215 |
|
216 |
-
# Display frames
|
217 |
-
|
|
|
|
|
|
|
218 |
|
219 |
# Launch the interface
|
220 |
demo.launch(debug=True)
|
|
|
213 |
outputs=None
|
214 |
)
|
215 |
|
216 |
+
# Display frames using a custom thread
|
217 |
+
def start_display_thread():
|
218 |
+
threading.Thread(target=display_frames, daemon=True).start()
|
219 |
+
|
220 |
+
demo.load(start_display_thread, inputs=None, outputs=[output_image, error_box])
|
221 |
|
222 |
# Launch the interface
|
223 |
demo.launch(debug=True)
|