claude-mat commited on
Commit
89c8aa3
·
verified ·
1 Parent(s): e9c2cf0

Upload webui.py

Browse files
Files changed (1) hide show
  1. webui.py +2 -8
webui.py CHANGED
@@ -1206,14 +1206,8 @@ def create_ui():
1206
  ])
1207
 
1208
  # Poll for history and scheduler status updates every 5 seconds
1209
- # Use a backward-compatible method for creating a timer
1210
- if hasattr(gr, 'Timer'):
1211
- # New way for Gradio 4.x and later
1212
- timer = gr.Timer(5)
1213
- timer.tick(fn=poll_updates, outputs=[history_gallery, scheduler_status, scheduler_output])
1214
- else:
1215
- # Old way for Gradio 3.x
1216
- app.load(fn=poll_updates, outputs=[history_gallery, scheduler_status, scheduler_output], every=5)
1217
 
1218
  return app
1219
 
 
1206
  ])
1207
 
1208
  # Poll for history and scheduler status updates every 5 seconds
1209
+ timer = gr.Timer(5)
1210
+ timer.tick(fn=poll_updates, outputs=[history_gallery, scheduler_status, scheduler_output])
 
 
 
 
 
 
1211
 
1212
  return app
1213