garvitsachdeva Claude Sonnet 4.6 commited on
Commit
278b691
·
1 Parent(s): 52e0424

Remove gr.Timer: caused C-level crash with no Python output

Browse files

gr.Timer in Gradio 5.50 segfaults on A100, producing zero container
logs (not even the early print statements). Replace with every=10 on
demo.load() which achieves the same auto-poll without native timer code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -460,7 +460,7 @@ footer { display: none !important; }
460
  with gr.Blocks(title="SpindleFlow RL Training", css=CSS) as demo:
461
  gr.Markdown("# 🤖 SpindleFlow RL — Training Dashboard")
462
  gr.Markdown(
463
- "Auto-refreshes every 10 s. "
464
  "When complete the trained model is pushed to your HF Hub repo."
465
  )
466
 
@@ -483,9 +483,7 @@ with gr.Blocks(title="SpindleFlow RL Training", css=CSS) as demo:
483
  elem_classes="log-box",
484
  )
485
 
486
- timer = gr.Timer(value=10)
487
- timer.tick(fn=_get_state, outputs=[status_box, log_box])
488
  refresh_btn.click(fn=_get_state, outputs=[status_box, log_box])
489
- demo.load(fn=_get_state, outputs=[status_box, log_box])
490
 
491
  demo.launch()
 
460
  with gr.Blocks(title="SpindleFlow RL Training", css=CSS) as demo:
461
  gr.Markdown("# 🤖 SpindleFlow RL — Training Dashboard")
462
  gr.Markdown(
463
+ "Live training log — updates every 10 s automatically. "
464
  "When complete the trained model is pushed to your HF Hub repo."
465
  )
466
 
 
483
  elem_classes="log-box",
484
  )
485
 
 
 
486
  refresh_btn.click(fn=_get_state, outputs=[status_box, log_box])
487
+ demo.load(fn=_get_state, outputs=[status_box, log_box], every=10)
488
 
489
  demo.launch()