Sanshruth commited on
Commit
04d2ef3
·
verified ·
1 Parent(s): 6e400f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -213,8 +213,11 @@ with gr.Blocks() as demo:
213
  outputs=None
214
  )
215
 
216
- # Display frames
217
- demo.load(display_frames, inputs=None, outputs=[output_image, error_box], every=0.03)
 
 
 
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)