Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -475,7 +475,12 @@ with block:
|
|
| 475 |
)
|
| 476 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 477 |
# Table 0
|
| 478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 479 |
"https://huggingface.co/spaces/V-STaR-Bench/V-STaR-LeaderBoard/resolve/main/results.csv",
|
| 480 |
header=[0, 1] # 告诉 pandas 前两行为表头
|
| 481 |
).map(lambda x: f"{x:.2f}" if isinstance(x, (int, float)) else x)
|
|
@@ -539,7 +544,7 @@ with block:
|
|
| 539 |
|
| 540 |
# 显示 DataFrame
|
| 541 |
data_component = gr.Dataframe(
|
| 542 |
-
value=
|
| 543 |
type="pandas",
|
| 544 |
interactive=False,
|
| 545 |
visible=True,
|
|
@@ -603,6 +608,36 @@ with block:
|
|
| 603 |
interactive=False,
|
| 604 |
visible=True,
|
| 605 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 606 |
|
| 607 |
# table info
|
| 608 |
with gr.TabItem("📝 About", elem_id="mvbench-tab-table", id=3):
|
|
|
|
| 475 |
)
|
| 476 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 477 |
# Table 0
|
| 478 |
+
df_main = pd.read_csv(
|
| 479 |
+
"https://huggingface.co/spaces/V-STaR-Bench/V-STaR-LeaderBoard/resolve/main/leaderboard.csv",
|
| 480 |
+
header=[0, 1] # 告诉 pandas 前两行为表头
|
| 481 |
+
).map(lambda x: f"{x:.2f}" if isinstance(x, (int, float)) else x)
|
| 482 |
+
|
| 483 |
+
df_domain = pd.read_csv(
|
| 484 |
"https://huggingface.co/spaces/V-STaR-Bench/V-STaR-LeaderBoard/resolve/main/results.csv",
|
| 485 |
header=[0, 1] # 告诉 pandas 前两行为表头
|
| 486 |
).map(lambda x: f"{x:.2f}" if isinstance(x, (int, float)) else x)
|
|
|
|
| 544 |
|
| 545 |
# 显示 DataFrame
|
| 546 |
data_component = gr.Dataframe(
|
| 547 |
+
value=df_domain,
|
| 548 |
type="pandas",
|
| 549 |
interactive=False,
|
| 550 |
visible=True,
|
|
|
|
| 608 |
interactive=False,
|
| 609 |
visible=True,
|
| 610 |
)
|
| 611 |
+
|
| 612 |
+
with gr.TabItem("📊 Domain"):
|
| 613 |
+
with gr.Row():
|
| 614 |
+
with gr.Accordion("Citation", open=False):
|
| 615 |
+
citation_button = gr.Textbox(
|
| 616 |
+
value=CITATION_BUTTON_TEXT,
|
| 617 |
+
label=CITATION_BUTTON_LABEL,
|
| 618 |
+
lines=14,
|
| 619 |
+
)
|
| 620 |
+
|
| 621 |
+
gr.Markdown(TABLE_INTRODUCTION)
|
| 622 |
+
|
| 623 |
+
# 复选框
|
| 624 |
+
# checkbox_group = gr.CheckboxGroup(
|
| 625 |
+
# choices=choices_from_csv,
|
| 626 |
+
# value=choices_from_csv, # 默认全选
|
| 627 |
+
# label="Evaluation Dimension",
|
| 628 |
+
# interactive=True,
|
| 629 |
+
# )
|
| 630 |
+
|
| 631 |
+
# with gr.Row():
|
| 632 |
+
# checkbox_group
|
| 633 |
+
|
| 634 |
+
# 显示 DataFrame
|
| 635 |
+
data_component = gr.Dataframe(
|
| 636 |
+
value=df_raw,
|
| 637 |
+
type="pandas",
|
| 638 |
+
interactive=False,
|
| 639 |
+
visible=True,
|
| 640 |
+
)
|
| 641 |
|
| 642 |
# table info
|
| 643 |
with gr.TabItem("📝 About", elem_id="mvbench-tab-table", id=3):
|