UltraRonin commited on
Commit
6992c96
·
1 Parent(s): 29e4e1f
app.py CHANGED
@@ -62,8 +62,8 @@ def init_leaderboard(dataframe):
62
  if dataframe is None or dataframe.empty:
63
  raise ValueError("Leaderboard DataFrame is empty or None.")
64
 
65
- # pdb.set_trace()
66
- num_cols = dataframe.select_dtypes(include=['number']).columns
67
  styler = dataframe.style.format({col: "{:.1f}" for col in num_cols})
68
  return gr.components.Dataframe(
69
  value=styler,
@@ -109,10 +109,10 @@ with demo:
109
  gr.HTML(TITLE)
110
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
111
 
112
- with gr.Tabs(elem_classes="tab-buttons") as tabs:
113
  with gr.TabItem("🏅 LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
114
  # leaderboard = init_leaderboard(LEADERBOARD_DF)
115
- with gr.Tabs():
116
  with gr.TabItem("Overall", elem_id="overall", id=0):
117
  leaderboard = init_leaderboard(LEADERBOARD_DF)
118
 
 
62
  if dataframe is None or dataframe.empty:
63
  raise ValueError("Leaderboard DataFrame is empty or None.")
64
 
65
+ pdb.set_trace()
66
+ num_cols = dataframe.select_dtypes(include=['float']).columns
67
  styler = dataframe.style.format({col: "{:.1f}" for col in num_cols})
68
  return gr.components.Dataframe(
69
  value=styler,
 
109
  gr.HTML(TITLE)
110
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
111
 
112
+ with gr.Tabs(elem_id="main-tabs", elem_classes="tab-buttons") as tabs:
113
  with gr.TabItem("🏅 LLM Benchmark", elem_id="llm-benchmark-tab-table", id=0):
114
  # leaderboard = init_leaderboard(LEADERBOARD_DF)
115
+ with gr.Tabs(elem_id="nested-tabs", elem_classes="nested-tab-buttons"):
116
  with gr.TabItem("Overall", elem_id="overall", id=0):
117
  leaderboard = init_leaderboard(LEADERBOARD_DF)
118
 
src/display/css_html_js.py CHANGED
@@ -50,6 +50,18 @@ custom_css = """
50
  font-size: 20px;
51
  }
52
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  #scale-logo {
54
  border-style: none !important;
55
  box-shadow: none;
 
50
  font-size: 20px;
51
  }
52
 
53
+ /* 主 Tabs 样式 */
54
+ #main-tabs .tab-buttons {
55
+ background-color: #f5f5f5; /* 设置背景颜色 */
56
+ border-bottom: 2px solid #ccc; /* 添加底部边框 */
57
+ }
58
+
59
+ /* 嵌套 Tabs 样式 */
60
+ #nested-tabs .nested-tab-buttons {
61
+ background-color: #e0f7fa; /* 另一个背景颜色 */
62
+ border-bottom: 2px solid #007bff; /* 蓝色边框 */
63
+ }
64
+
65
  #scale-logo {
66
  border-style: none !important;
67
  box-shadow: none;
src/leaderboard/read_evals.py CHANGED
@@ -87,7 +87,10 @@ class EvalResult:
87
  for metric in Metrics:
88
  metric = metric.value
89
 
90
- results[metric.short] = float(data["results"][task][metric.short])
 
 
 
91
 
92
  return self(
93
  eval_name=result_key,
 
87
  for metric in Metrics:
88
  metric = metric.value
89
 
90
+ if metric.short == "Tokens":
91
+ results[metric.short] = int(data["results"][task][metric.short])
92
+ else:
93
+ results[metric.short] = float(data["results"][task][metric.short])
94
 
95
  return self(
96
  eval_name=result_key,