Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -476,31 +476,39 @@ with block:
|
|
476 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
477 |
# Table 0
|
478 |
df = pd.read_csv("https://huggingface.co/spaces/V-STaR-Bench/V-STaR-LeaderBoard/resolve/main/results.csv")
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
|
505 |
# table info
|
506 |
with gr.TabItem("📝 About", elem_id="mvbench-tab-table", id=5):
|
|
|
476 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
477 |
# Table 0
|
478 |
df = pd.read_csv("https://huggingface.co/spaces/V-STaR-Bench/V-STaR-LeaderBoard/resolve/main/results.csv")
|
479 |
+
all_columns = df.columns.tolist()[1:]
|
480 |
+
choices_from_csv = [col.strip() for col in all_columns if col.strip()]
|
481 |
+
|
482 |
+
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
483 |
+
with gr.TabItem("📊 V-STaR"):
|
484 |
+
with gr.Row():
|
485 |
+
with gr.Accordion("Citation", open=False):
|
486 |
+
citation_button = gr.Textbox(
|
487 |
+
value=CITATION_BUTTON_TEXT,
|
488 |
+
label=CITATION_BUTTON_LABEL,
|
489 |
+
lines=14,
|
490 |
+
)
|
491 |
+
gr.Markdown(TABLE_INTRODUCTION)
|
492 |
+
|
493 |
+
# 添加一个 CheckboxGroup,用 CSV 中的类别作为选项
|
494 |
+
checkbox_group = gr.CheckboxGroup(
|
495 |
+
choices=choices_from_csv,
|
496 |
+
value=choices_from_csv, # 默认全部选中,可根据需要调整
|
497 |
+
label="Evaluation Dimension",
|
498 |
+
interactive=True,
|
499 |
+
)
|
500 |
+
|
501 |
+
# 将 checkbox_group 放在一行中展示(可选)
|
502 |
+
with gr.Row():
|
503 |
+
checkbox_group
|
504 |
+
|
505 |
+
# 显示 CSV 数据的 Dataframe 组件
|
506 |
+
data_component = gr.components.Dataframe(
|
507 |
+
value=df,
|
508 |
+
type="pandas",
|
509 |
+
interactive=False,
|
510 |
+
visible=True,
|
511 |
+
)
|
512 |
|
513 |
# table info
|
514 |
with gr.TabItem("📝 About", elem_id="mvbench-tab-table", id=5):
|