daiqi commited on
Commit
5b9a852
·
verified ·
1 Parent(s): aa53fd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -31
app.py CHANGED
@@ -66,38 +66,31 @@ def init_leaderboard(dataframe):
66
  if dataframe is None or dataframe.empty:
67
  raise ValueError("Leaderboard DataFrame is empty or None.")
68
  return Leaderboard(
69
- value=pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]}),
70
- select_columns=SelectColumns(default_selection=["a", "b"],
71
- cant_deselect="a",
72
- label="Select The Columns",
73
- info="Helpful information")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  )
75
- # Leaderboard(
76
- # value=dataframe, #dataframe,
77
- # select_columns=SelectColumns(
78
- # default_selection=["Name", "BaseModel", "Link", "Env."],
79
- # cant_deselect=["Name", "BaseModel"],
80
- # label="Select Columns to Display:",
81
- # ),
82
- # search_columns=SearchColumns(primary_column="Name", secondary_columns="BaseModel",
83
- # placeholder="Search by work name or basemodel. To search by country, type 'basemodel:<query>'",
84
- # label="Search"),
85
- # filter_columns=[
86
- # ColumnFilter("Target-research", type="checkbox", label="Comparison settings for target researches"),
87
- # ColumnFilter(AutoEvalColumn.precision.name, type="checkboxgroup", label="Precision"),
88
- # ColumnFilter(
89
- # AutoEvalColumn.params.name,
90
- # type="slider",
91
- # min=0.01,
92
- # max=150,
93
- # label="Select the number of parameters (B)",
94
- # ),
95
- # ColumnFilter(
96
- # AutoEvalColumn.still_on_hub.name, type="boolean", label="Deleted/incomplete", default=True
97
- # ),
98
- # ],
99
- # interactive=False,
100
- # )
101
 
102
 
103
  demo = gr.Blocks(css=custom_css)
 
66
  if dataframe is None or dataframe.empty:
67
  raise ValueError("Leaderboard DataFrame is empty or None.")
68
  return Leaderboard(
69
+ value=dataframe, #dataframe,
70
+ select_columns=SelectColumns(
71
+ default_selection=["Name", "BaseModel", "Link", "Env."],
72
+ cant_deselect=["Name", "BaseModel"],
73
+ label="Select Columns to Display:",
74
+ ),
75
+ search_columns=SearchColumns(primary_column="Name", secondary_columns=["BaseModel", "Target-research"],
76
+ placeholder="Search by work name or basemodel. To search by country, type 'basemodel:<query>'",
77
+ label="Search"),
78
+ filter_columns=[
79
+ ColumnFilter("Target-research", type="checkbox", label="Comparison settings for target researches"),
80
+ ColumnFilter(AutoEvalColumn.precision.name, type="checkboxgroup", label="Precision"),
81
+ ColumnFilter(
82
+ AutoEvalColumn.params.name,
83
+ type="slider",
84
+ min=0.01,
85
+ max=150,
86
+ label="Select the number of parameters (B)",
87
+ ),
88
+ ColumnFilter(
89
+ AutoEvalColumn.still_on_hub.name, type="boolean", label="Deleted/incomplete", default=True
90
+ ),
91
+ ],
92
+ interactive=False,
93
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
 
96
  demo = gr.Blocks(css=custom_css)