Spaces:
Running
Running
Sibam commited on
Commit ·
e71b4ea
1
Parent(s): a27c1c3
fix: update Gradio polling logic to use Timer instead of deprecated every kwarg
Browse files64 unmodified lines656667686970717264 unmodified linesdata.append({"Step": getattr(log, "step_count", 0), "Reward": float(log.reward)})return pd.DataFrame(data)# Polling every 1 second to update the UIblocks.load(get_chart_data, inputs=None, outputs=reward_plot, every=1)return blocks# Mounts the Gradio playground at /web and redirects / → /web/64 unmodified lines65666768697071727364 unmodified linesdata.append({"Step": getattr(log, "step_count", 0), "Reward": float(log.reward)})return pd.DataFrame(data)# Polling every 1 second to update the UI using Gradio 4.x gr.Timertimer = gr.Timer(1)timer.tick(get_chart_data, inputs=None, outputs=reward_plot)return blocks# Mounts the Gradio playground at /web and redirects / → /web/
server/app.py+3-2