This commit is contained in:
hailin 2025-07-27 16:00:36 +08:00
parent c8c95bd62f
commit 3e8115b036
1 changed files with 3 additions and 4 deletions

View File

@ -105,12 +105,11 @@ with gr.Blocks(title="调试界面") as demo:
# )
# ────────────── 定时刷新日志 ──────────────
logger = gr.Timer(1.0) # 1秒一次
logger = gr.Timer(1.0, render=False) # 1触发一次
logger.tick(
fn=consume_logs,
inputs=log_state,
outputs=log_state,
every=True # 持续执行
inputs=[log_state],
outputs=[log_state],
)
# 显示到 log_box