onekq commited on
Commit
274dd90
β€’
1 Parent(s): 24f983f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -62,13 +62,6 @@ demo = gr.Blocks()
62
  with demo:
63
  gr.Markdown("# πŸ† WebApp1K Models Leaderboard")
64
 
65
- model_input = gr.Dropdown(choices=models, label="Select Model")
66
- scenario_input = gr.Dropdown(choices=scenarios, label="Select Category")
67
- output = gr.DataFrame(headers=["pass@1", "pass@5", "pass@10"])
68
-
69
- filter_button = gr.Button("Filter")
70
- filter_button.click(filter_data, inputs=[model_input, scenario_input], outputs=output)
71
-
72
  # Initialize leaderboard with the complete DataFrame
73
  complete_pass_at_k = df.groupby('Model')[['Runs', 'Successes']].apply(lambda x: pd.Series({
74
  'pass@1': estimate_pass_at_k(x['Runs'].values, x['Successes'].values, 1).mean(),
@@ -78,5 +71,12 @@ with demo:
78
 
79
  leaderboard = init_leaderboard(complete_pass_at_k)
80
 
 
 
 
 
 
 
 
81
  # Launch the Gradio interface
82
  demo.launch()
 
62
  with demo:
63
  gr.Markdown("# πŸ† WebApp1K Models Leaderboard")
64
 
 
 
 
 
 
 
 
65
  # Initialize leaderboard with the complete DataFrame
66
  complete_pass_at_k = df.groupby('Model')[['Runs', 'Successes']].apply(lambda x: pd.Series({
67
  'pass@1': estimate_pass_at_k(x['Runs'].values, x['Successes'].values, 1).mean(),
 
71
 
72
  leaderboard = init_leaderboard(complete_pass_at_k)
73
 
74
+ model_input = gr.Dropdown(choices=models, label="Select Model")
75
+ scenario_input = gr.Dropdown(choices=scenarios, label="Select Category")
76
+ output = gr.DataFrame(headers=["pass@1", "pass@5", "pass@10"])
77
+
78
+ filter_button = gr.Button("Filter")
79
+ filter_button.click(filter_data, inputs=[model_input, scenario_input], outputs=output)
80
+
81
  # Launch the Gradio interface
82
  demo.launch()