Clémentine commited on
Commit
5312397
·
1 Parent(s): 6cbc52e

added refresh btn back

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -49,6 +49,7 @@ def create_app() -> gr.Blocks:
49
  with gr.Row():
50
  launch_btn = gr.Button("Launch All Jobs", variant="secondary", scale=2)
51
  relaunch_failed_btn = gr.Button("Relaunch Failed", variant="stop", scale=1)
 
52
 
53
  output = gr.Textbox(label="Status", interactive=False)
54
 
@@ -110,6 +111,15 @@ def create_app() -> gr.Blocks:
110
  outputs=[output, results_table, summary_stats]
111
  )
112
 
 
 
 
 
 
 
 
 
 
113
  # Handle dataframe cell selection for relaunch
114
  def handle_table_select(evt: gr.SelectData):
115
  """Handle when a cell in the results table is clicked."""
 
49
  with gr.Row():
50
  launch_btn = gr.Button("Launch All Jobs", variant="secondary", scale=2)
51
  relaunch_failed_btn = gr.Button("Relaunch Failed", variant="stop", scale=1)
52
+ refresh_btn = gr.Button("🔄 Refresh", variant="secondary", scale=1)
53
 
54
  output = gr.Textbox(label="Status", interactive=False)
55
 
 
111
  outputs=[output, results_table, summary_stats]
112
  )
113
 
114
+ def refresh_display():
115
+ """Refresh the table and stats display."""
116
+ return get_results_table(), get_summary_stats()
117
+
118
+ refresh_btn.click(
119
+ fn=refresh_display,
120
+ outputs=[results_table, summary_stats]
121
+ )
122
+
123
  # Handle dataframe cell selection for relaunch
124
  def handle_table_select(evt: gr.SelectData):
125
  """Handle when a cell in the results table is clicked."""