Spaces:
Sleeping
Sleeping
Commit
·
6ac4977
1
Parent(s):
d4cc9d6
Revert
Browse files
app.py
CHANGED
|
@@ -820,9 +820,21 @@ def create_interface():
|
|
| 820 |
outputs=[status_output]
|
| 821 |
)
|
| 822 |
|
| 823 |
-
#
|
| 824 |
-
|
| 825 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|