onekq commited on
Commit
af42bd2
·
verified ·
1 Parent(s): 104f506

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -38,7 +38,7 @@ def filter_data(model, scenario):
38
  return pd.DataFrame([pass_at_k])
39
 
40
  # Initialize the leaderboard
41
- def init_leaderboard(dataframe, default_selection=["Model", "pass@1"], height=600):
42
  if dataframe is None or dataframe.empty:
43
  raise ValueError("Leaderboard DataFrame is empty or None.")
44
  return Leaderboard(
@@ -74,13 +74,13 @@ with gr.Blocks() as demo:
74
  "[AI Models](https://www.aimodels.fyi/papers/arxiv/webapp1k-practical-code-generation-benchmark-web-app)")
75
 
76
  with gr.Row():
77
- with gr.Column(scale=1, max_width=600):
78
  gr.Markdown("## WebApp1K-Duo ([Benchmark](https://huggingface.co/datasets/onekq-ai/WebApp1K-Duo-React))")
79
- duo_leaderboard = init_leaderboard(duo_complete_pass_at_k, default_selection=[], height=600)
80
 
81
- with gr.Column(scale=1, max_width=600):
82
  gr.Markdown("## WebApp1K ([Benchmark](https://huggingface.co/datasets/onekq-ai/WebApp1K-React))")
83
- leaderboard = init_leaderboard(complete_pass_at_k, default_selection=[], height=600)
84
 
85
  # Launch the Gradio interface
86
  demo.launch()
 
38
  return pd.DataFrame([pass_at_k])
39
 
40
  # Initialize the leaderboard
41
+ def init_leaderboard(dataframe, height=600):
42
  if dataframe is None or dataframe.empty:
43
  raise ValueError("Leaderboard DataFrame is empty or None.")
44
  return Leaderboard(
 
74
  "[AI Models](https://www.aimodels.fyi/papers/arxiv/webapp1k-practical-code-generation-benchmark-web-app)")
75
 
76
  with gr.Row():
77
+ with gr.Column(scale=1):
78
  gr.Markdown("## WebApp1K-Duo ([Benchmark](https://huggingface.co/datasets/onekq-ai/WebApp1K-Duo-React))")
79
+ duo_leaderboard = init_leaderboard(duo_complete_pass_at_k, height=600)
80
 
81
+ with gr.Column(scale=1):
82
  gr.Markdown("## WebApp1K ([Benchmark](https://huggingface.co/datasets/onekq-ai/WebApp1K-React))")
83
+ leaderboard = init_leaderboard(complete_pass_at_k, height=600)
84
 
85
  # Launch the Gradio interface
86
  demo.launch()