daiqi commited on
Commit
9afe185
Β·
verified Β·
1 Parent(s): fe96d5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -5
app.py CHANGED
@@ -51,10 +51,20 @@ except Exception:
51
  restart_space()
52
 
53
 
54
- LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
55
- _test_data = pd.DataFrame({"Score": [54,46,53], "Name": ["MageBench", "MageBench", "MageBench"], "BaseModel": ["GPT-4o", "GPT-4o", "LLaMA"], "Env.": ["Sokoban", "Sokoban", "Football"],
56
- "Target-research": ["Model-Eval-Global", "Model-Eval-Online", "Agent-Eval-Prompt"], "Subset": ["mini", "all", "mini"], "Link": ["xxx", "xxx", "xxx"]})
57
-
 
 
 
 
 
 
 
 
 
 
58
 
59
  (
60
  finished_eval_queue_df,
@@ -104,7 +114,7 @@ with demo:
104
 
105
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
106
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
107
- leaderboard = init_leaderboard(_test_data) # LEADERBOARD_DF
108
 
109
  with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=2):
110
  gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")
 
51
  restart_space()
52
 
53
 
54
+ # LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
55
+ import jsonlines
56
+
57
+ # Initialize an empty list to store the JSON objects
58
+ json_list = []
59
+
60
+ # Open the JSONL file
61
+ with jsonlines.open('commit_results.jsonl') as reader:
62
+ for obj in reader:
63
+ # Append each JSON object to the list
64
+ json_list.append(obj)
65
+ # _test_data = pd.DataFrame({"Score": [54,46,53], "Name": ["MageBench", "MageBench", "MageBench"], "BaseModel": ["GPT-4o", "GPT-4o", "LLaMA"], "Env.": ["Sokoban", "Sokoban", "Football"],
66
+ # "Target-research": ["Model-Eval-Global", "Model-Eval-Online", "Agent-Eval-Prompt"], "Subset": ["mini", "all", "mini"], "Link": ["xxx", "xxx", "xxx"]})
67
+ committed = pd.DataFrame(json_list)
68
 
69
  (
70
  finished_eval_queue_df,
 
114
 
115
  with gr.Tabs(elem_classes="tab-buttons") as tabs:
116
  with gr.TabItem("πŸ… LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
117
+ leaderboard = init_leaderboard(committed) # LEADERBOARD_DF
118
 
119
  with gr.TabItem("πŸ“ About", elem_id="llm-benchmark-tab-table", id=2):
120
  gr.Markdown(LLM_BENCHMARKS_TEXT, elem_classes="markdown-text")