benediktstroebl commited on
Commit
044c8f9
·
verified ·
1 Parent(s): dabe474

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -458,7 +458,7 @@ with gr.Blocks(theme=my_theme, css='css.css', title="HAL: Holistic Agent Leaderb
458
  <p>Select a benchmark to see the agent leaderboard. Verified results have been run by the HAL team:</p>
459
  """)
460
 
461
- with gr.Tabs():
462
  with gr.Tab("USACO"):
463
  gr.Markdown("""The USA Computing Olympiad (USACO) is a computer programming competition for pre-college students. This benchmark evaluates the performance of AI agents on a set of 307 USACO tasks. The agents are evaluated based on the number of tasks correctly solved.""")
464
  with gr.Row():
@@ -1130,7 +1130,14 @@ with gr.Blocks(theme=my_theme, css='css.css', title="HAL: Holistic Agent Leaderb
1130
  with gr.Tab("About"):
1131
  gr.Markdown((Path(__file__).parent / "about.md").read_text())
1132
 
1133
-
 
 
 
 
 
 
 
1134
  gr.HTML("""<h2 class="section-heading" id="agent-submission">How to add an agent?</h2>""")
1135
  gr.Markdown((Path(__file__).parent / "agent_submission.md").read_text())
1136
  gr.HTML("""<h2 class="section-heading" id="benchmark-submission">How to add a benchmark?</h2>""")
 
458
  <p>Select a benchmark to see the agent leaderboard. Verified results have been run by the HAL team:</p>
459
  """)
460
 
461
+ with gr.Tabs() as tabs:
462
  with gr.Tab("USACO"):
463
  gr.Markdown("""The USA Computing Olympiad (USACO) is a computer programming competition for pre-college students. This benchmark evaluates the performance of AI agents on a set of 307 USACO tasks. The agents are evaluated based on the number of tasks correctly solved.""")
464
  with gr.Row():
 
1130
  with gr.Tab("About"):
1131
  gr.Markdown((Path(__file__).parent / "about.md").read_text())
1132
 
1133
+ # Will trigger autoscaling of plots when tabs are switched
1134
+ tabs.select(fn=None, inputs=None, outputs=None, js="""
1135
+ function() {
1136
+ setTimeout(function() {
1137
+ window.dispatchEvent(new Event('resize'));
1138
+ }, 100);
1139
+ }
1140
+ """)
1141
  gr.HTML("""<h2 class="section-heading" id="agent-submission">How to add an agent?</h2>""")
1142
  gr.Markdown((Path(__file__).parent / "agent_submission.md").read_text())
1143
  gr.HTML("""<h2 class="section-heading" id="benchmark-submission">How to add a benchmark?</h2>""")