badaoui HF Staff commited on
Commit
76e6276
Β·
2 Parent(s): 871d304 78473e2

Merge main branch - resolve conflicts in app.py

Browse files

- Use colleague's show_summary_and_update_links function (from main)
- Keep colleague's demo.load format and outputs
- Add regressions panel loading via .then() chain
- Preserve all historical data visualization features from PR

Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -632,7 +632,6 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
632
  return "πŸ”— **CI Jobs:** *Error loading links*\n\n❓ **[FAQ](README.md)**"
633
 
634
 
635
-
636
 
637
  def get_historical_summary_plots():
638
  """Get historical summary plots from preloaded data."""
@@ -903,14 +902,18 @@ with gr.Blocks(title="Model Test Results Dashboard", css=load_css(), js=js_func)
903
  ],
904
  )
905
 
906
- # Auto-update CI links and regressions when the interface loads
907
- def load_dashboard_data():
908
- """Load both CI links and regressions data."""
909
- return get_ci_links(), get_regressions_text()
910
-
 
911
  demo.load(
912
- fn=load_dashboard_data,
913
- outputs=[ci_links_display, regressions_panel]
 
 
 
914
  )
915
 
916
 
 
632
  return "πŸ”— **CI Jobs:** *Error loading links*\n\n❓ **[FAQ](README.md)**"
633
 
634
 
 
635
 
636
  def get_historical_summary_plots():
637
  """Get historical summary plots from preloaded data."""
 
902
  ],
903
  )
904
 
905
+ # Summary button click handler
906
+ def show_summary_and_update_links():
907
+ """Show summary page and update CI links."""
908
+ return create_summary_page(Ci_results.df, Ci_results.available_models), get_description_text(), get_ci_links()
909
+
910
+ # Auto-update summary, description, CI links, and regressions when the interface loads
911
  demo.load(
912
+ fn=show_summary_and_update_links,
913
+ outputs=[summary_display, description_display, ci_links_display]
914
+ ).then(
915
+ fn=get_regressions_text,
916
+ outputs=[regressions_panel]
917
  )
918
 
919