Spaces:
Sleeping
Sleeping
meg-huggingface
commited on
Commit
•
37ad431
1
Parent(s):
f712ac1
UI stuff
Browse files- app.py +3 -2
- src/display/utils.py +11 -11
app.py
CHANGED
@@ -167,13 +167,14 @@ with demo:
|
|
167 |
for c in fields(AutoEvalColumn)
|
168 |
if c.displayed_by_default and not c.hidden and not c.never_hidden and not c.advanced
|
169 |
],
|
170 |
-
label="Select
|
171 |
elem_id="column-select",
|
172 |
interactive=True,
|
173 |
)
|
|
|
174 |
with gr.Row():
|
175 |
deleted_models_visibility = gr.Checkbox(
|
176 |
-
value=False, label="Show gated/private/deleted models", interactive=True
|
177 |
)
|
178 |
with gr.Column(min_width=320):
|
179 |
#with gr.Box(elem_id="box-filter"):
|
|
|
167 |
for c in fields(AutoEvalColumn)
|
168 |
if c.displayed_by_default and not c.hidden and not c.never_hidden and not c.advanced
|
169 |
],
|
170 |
+
label="Select metrics to show",
|
171 |
elem_id="column-select",
|
172 |
interactive=True,
|
173 |
)
|
174 |
+
# Minimizing amount of front content.
|
175 |
with gr.Row():
|
176 |
deleted_models_visibility = gr.Checkbox(
|
177 |
+
value=False, label="Show gated/private/deleted models", interactive=True, visible=False,
|
178 |
)
|
179 |
with gr.Column(min_width=320):
|
180 |
#with gr.Box(elem_id="box-filter"):
|
src/display/utils.py
CHANGED
@@ -16,7 +16,7 @@ def fields(raw_class):
|
|
16 |
class ColumnContent:
|
17 |
name: str
|
18 |
type: str
|
19 |
-
displayed_by_default: bool
|
20 |
hidden: bool = False
|
21 |
never_hidden: bool = False
|
22 |
dummy: bool = False
|
@@ -28,19 +28,19 @@ auto_eval_column_dict = []
|
|
28 |
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent(name="T", type="str", displayed_by_default=True, never_hidden=True)])
|
29 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent(name="Model", type="markdown", displayed_by_default=True, never_hidden=True)])
|
30 |
#Scores
|
31 |
-
auto_eval_column_dict.append(["average", ColumnContent, ColumnContent(name="Average ⬆️", type="number", displayed_by_default=
|
32 |
for task in Tasks:
|
33 |
auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(name=task.value.col_name, type="number", displayed_by_default=True)])
|
34 |
# Model information
|
35 |
-
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent(name="Type", type="str", displayed_by_default=False, advanced=True)])
|
36 |
-
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", displayed_by_default=False, advanced=True)])
|
37 |
-
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", displayed_by_default=False, advanced=True)])
|
38 |
-
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", displayed_by_default=False, advanced=True)])
|
39 |
-
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", displayed_by_default=False, advanced=True)])
|
40 |
-
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", displayed_by_default=False, advanced=True)])
|
41 |
-
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", displayed_by_default=False, advanced=True)])
|
42 |
-
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", displayed_by_default=False, advanced=True)])
|
43 |
-
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", displayed_by_default=False, advanced=True)])
|
44 |
# Dummy column for the search bar (hidden by the custom CSS)
|
45 |
auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_for_query", "str", displayed_by_default=False, dummy=True)])
|
46 |
|
|
|
16 |
class ColumnContent:
|
17 |
name: str
|
18 |
type: str
|
19 |
+
displayed_by_default: bool = False
|
20 |
hidden: bool = False
|
21 |
never_hidden: bool = False
|
22 |
dummy: bool = False
|
|
|
28 |
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent(name="T", type="str", displayed_by_default=True, never_hidden=True)])
|
29 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent(name="Model", type="markdown", displayed_by_default=True, never_hidden=True)])
|
30 |
#Scores
|
31 |
+
auto_eval_column_dict.append(["average", ColumnContent, ColumnContent(name="Average ⬆️", type="number", never_hidden=False, displayed_by_default=False)])
|
32 |
for task in Tasks:
|
33 |
auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(name=task.value.col_name, type="number", displayed_by_default=True)])
|
34 |
# Model information
|
35 |
+
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent(name="Type", type="str", never_hidden=False, displayed_by_default=False, advanced=True)])
|
36 |
+
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", never_hidden=False, displayed_by_default=False, advanced=True)])
|
37 |
+
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", never_hidden=False, displayed_by_default=False, advanced=True)])
|
38 |
+
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", never_hidden=False, displayed_by_default=False, advanced=True)])
|
39 |
+
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", never_hidden=False, displayed_by_default=False, advanced=True)])
|
40 |
+
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", never_hidden=False, displayed_by_default=False, advanced=True)])
|
41 |
+
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", never_hidden=False, displayed_by_default=False, advanced=True)])
|
42 |
+
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", never_hidden=False, displayed_by_default=False, advanced=True)])
|
43 |
+
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", never_hidden=False, displayed_by_default=False, advanced=True)])
|
44 |
# Dummy column for the search bar (hidden by the custom CSS)
|
45 |
auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_for_query", "str", displayed_by_default=False, dummy=True)])
|
46 |
|