shank commited on
Commit ·
5eea2dd
1
Parent(s): ba8df98
Fix Gradio 4.x every= deprecation: use gr.Timer for auto-refresh
Browse files
app.py
CHANGED
|
@@ -97,10 +97,14 @@ Training **Qwen2.5-Coder-7B-Instruct** on structured hypothesis-driven debugging
|
|
| 97 |
max_lines=50,
|
| 98 |
interactive=False,
|
| 99 |
)
|
| 100 |
-
refresh_btn = gr.Button("Refresh Status")
|
| 101 |
refresh_btn.click(fn=check_status, outputs=status_box)
|
| 102 |
|
| 103 |
-
#
|
| 104 |
-
demo.load(fn=check_status, outputs=status_box
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 97 |
max_lines=50,
|
| 98 |
interactive=False,
|
| 99 |
)
|
| 100 |
+
refresh_btn = gr.Button("🔄 Refresh Status")
|
| 101 |
refresh_btn.click(fn=check_status, outputs=status_box)
|
| 102 |
|
| 103 |
+
# Load initial status on page load
|
| 104 |
+
demo.load(fn=check_status, outputs=status_box)
|
| 105 |
+
|
| 106 |
+
# Auto-refresh timer (Gradio 4.x syntax)
|
| 107 |
+
timer = gr.Timer(value=30)
|
| 108 |
+
timer.tick(fn=check_status, outputs=status_box)
|
| 109 |
|
| 110 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|