albertvillanova HF staff commited on
Commit
0d84f54
1 Parent(s): 54202cb

Call display_details on multiple triggers

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -345,16 +345,13 @@ with gr.Blocks(fill_height=True) as demo:
345
  fn=load_details_dataframes,
346
  inputs=[subtask, model_id_1, model_id_2],
347
  outputs=[details_dataframe_1, details_dataframe_2],
348
- ).then(
349
- fn=display_details,
350
- inputs=[sample_idx, details_dataframe_1, details_dataframe_2],
351
- outputs=details,
352
  ).then(
353
  fn=update_sample_idx_component,
354
  inputs=[details_dataframe_1, details_dataframe_2],
355
  outputs=sample_idx,
356
  )
357
- sample_idx.change(
 
358
  fn=display_details,
359
  inputs=[sample_idx, details_dataframe_1, details_dataframe_2],
360
  outputs=details,
 
345
  fn=load_details_dataframes,
346
  inputs=[subtask, model_id_1, model_id_2],
347
  outputs=[details_dataframe_1, details_dataframe_2],
 
 
 
 
348
  ).then(
349
  fn=update_sample_idx_component,
350
  inputs=[details_dataframe_1, details_dataframe_2],
351
  outputs=sample_idx,
352
  )
353
+ gr.on(
354
+ triggers=[details_dataframe_1.change, details_dataframe_2.change, sample_idx.change],
355
  fn=display_details,
356
  inputs=[sample_idx, details_dataframe_1, details_dataframe_2],
357
  outputs=details,