Spaces:
Runtime error
Runtime error
fix bug
Browse files
app.py
CHANGED
|
@@ -21,6 +21,28 @@ def get_color(index):
|
|
| 21 |
# 固定饱和度为70%,亮度为60%,确保颜色既鲜艳又不刺眼
|
| 22 |
return f"hsl({hue}, 70%, 60%)"
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
class ResultParser:
|
| 25 |
def __init__(self, output_dir: str):
|
| 26 |
self.output_dir = Path(output_dir)
|
|
@@ -745,32 +767,8 @@ def create_gradio_interface(parser: ResultParser):
|
|
| 745 |
|
| 746 |
return length_heatmap, contextual_chart, primary_task_radar_chart, language_chart, difficulty_chart, bon_chart, pass_k_chart
|
| 747 |
|
| 748 |
-
# 自定义CSS:
|
| 749 |
-
# 1. 强制所有表头居中(包括内部的按钮或文本容器)
|
| 750 |
-
# 2. 除了第一列(模型名称),其他列内容居中
|
| 751 |
-
custom_css = """
|
| 752 |
-
/* 强制标题居中 */
|
| 753 |
-
h1 {
|
| 754 |
-
text-align: center;
|
| 755 |
-
display: block;
|
| 756 |
-
}
|
| 757 |
-
|
| 758 |
-
/* 表头居中 */
|
| 759 |
-
#leaderboard_table th,
|
| 760 |
-
#leaderboard_table th button,
|
| 761 |
-
#leaderboard_table th span {
|
| 762 |
-
text-align: center !important;
|
| 763 |
-
justify-content: center !important;
|
| 764 |
-
}
|
| 765 |
-
|
| 766 |
-
/* 内容列居中:从第3列开始(跳过行号和模型名称) */
|
| 767 |
-
#leaderboard_table td:nth-child(n+3) {
|
| 768 |
-
text-align: center !important;
|
| 769 |
-
}
|
| 770 |
-
"""
|
| 771 |
-
|
| 772 |
# 创建界面
|
| 773 |
-
with gr.Blocks(title="LongBench Pro 结果可视化", theme=gr.themes.Soft(), css=
|
| 774 |
gr.Markdown("# LongBench Pro 结果可视化")
|
| 775 |
|
| 776 |
gr.HTML("""
|
|
@@ -795,7 +793,6 @@ def create_gradio_interface(parser: ResultParser):
|
|
| 795 |
wrap=True,
|
| 796 |
show_row_numbers=True,
|
| 797 |
show_search="filter",
|
| 798 |
-
show_fullscreen_button=True,
|
| 799 |
max_height=800,
|
| 800 |
column_widths=["250px", "100px", "100px", "100px", "120px", "120px"],
|
| 801 |
elem_id="leaderboard_table"
|
|
|
|
| 21 |
# 固定饱和度为70%,亮度为60%,确保颜色既鲜艳又不刺眼
|
| 22 |
return f"hsl({hue}, 70%, 60%)"
|
| 23 |
|
| 24 |
+
# 自定义CSS
|
| 25 |
+
CUSTOM_CSS = """
|
| 26 |
+
/* 强制标题居中 */
|
| 27 |
+
h1 {
|
| 28 |
+
text-align: center;
|
| 29 |
+
display: block;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
/* 表头居中 */
|
| 33 |
+
#leaderboard_table th,
|
| 34 |
+
#leaderboard_table th button,
|
| 35 |
+
#leaderboard_table th span {
|
| 36 |
+
text-align: center !important;
|
| 37 |
+
justify-content: center !important;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/* 内容列居中:从第3列开始(跳过行号和模型名称) */
|
| 41 |
+
#leaderboard_table td:nth-child(n+3) {
|
| 42 |
+
text-align: center !important;
|
| 43 |
+
}
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
class ResultParser:
|
| 47 |
def __init__(self, output_dir: str):
|
| 48 |
self.output_dir = Path(output_dir)
|
|
|
|
| 767 |
|
| 768 |
return length_heatmap, contextual_chart, primary_task_radar_chart, language_chart, difficulty_chart, bon_chart, pass_k_chart
|
| 769 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 770 |
# 创建界面
|
| 771 |
+
with gr.Blocks(title="LongBench Pro 结果可视化", theme=gr.themes.Soft(), css=CUSTOM_CSS) as demo:
|
| 772 |
gr.Markdown("# LongBench Pro 结果可视化")
|
| 773 |
|
| 774 |
gr.HTML("""
|
|
|
|
| 793 |
wrap=True,
|
| 794 |
show_row_numbers=True,
|
| 795 |
show_search="filter",
|
|
|
|
| 796 |
max_height=800,
|
| 797 |
column_widths=["250px", "100px", "100px", "100px", "120px", "120px"],
|
| 798 |
elem_id="leaderboard_table"
|
results/Claude-3.7-Sonnet/{nonthinking_context-120000_bon-3_summary.json → nonthinking_context-200000_bon-3_summary.json}
RENAMED
|
File without changes
|
results/Claude-3.7-Sonnet/{thinking_context-120000_bon-3_summary.json → thinking_context-200000_bon-3_summary.json}
RENAMED
|
File without changes
|