Saiyaswanth007 commited on
Commit
165a03e
·
1 Parent(s): f09b373

Check point 4

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -820,9 +820,21 @@ def create_interface():
820
  outputs=[status_output]
821
  )
822
 
823
- # Create timers for auto-refreshing components
824
- conversation_timer = gr.Timer(1, refresh_conversation, outputs=[conversation_output])
825
- status_timer = gr.Timer(2, refresh_status, outputs=[status_output])
 
 
 
 
 
 
 
 
 
 
 
 
826
 
827
  return interface
828
 
 
820
  outputs=[status_output]
821
  )
822
 
823
+ # Auto-refresh conversation display every 1 second
824
+ gr.on(
825
+ event="interval",
826
+ fn=refresh_conversation,
827
+ outputs=[conversation_output],
828
+ interval_seconds=1
829
+ )
830
+
831
+ # Auto-refresh status every 2 seconds
832
+ gr.on(
833
+ event="interval",
834
+ fn=refresh_status,
835
+ outputs=[status_output],
836
+ interval_seconds=2
837
+ )
838
 
839
  return interface
840