Update ranking
Browse files- src/display/utils.py +26 -10
src/display/utils.py
CHANGED
@@ -37,20 +37,36 @@ auto_eval_column_dict = [
|
|
37 |
]
|
38 |
|
39 |
# Add task-specific columns
|
|
|
40 |
for task in Tasks:
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
# Add model information columns
|
|
|
|
|
44 |
model_info_columns = [
|
45 |
-
("model_type", "Type", "str",
|
46 |
-
("architecture", "Architecture", "str",
|
47 |
-
("weight_type", "Weight type", "str",
|
48 |
-
("precision", "Precision", "str",
|
49 |
-
("license", "License", "str",
|
50 |
-
("params", "Parameters", "number",
|
51 |
-
("likes", "Likes", "number",
|
52 |
-
("still_on_hub", "
|
53 |
-
("revision", "Revision", "str",
|
54 |
]
|
55 |
|
56 |
for col_name, display_name, col_type, displayed_by_default, *args in model_info_columns:
|
|
|
37 |
]
|
38 |
|
39 |
# Add task-specific columns
|
40 |
+
remaining_tasks_to_display = 2
|
41 |
for task in Tasks:
|
42 |
+
displayed_by_default = True
|
43 |
+
if remaining_tasks_to_display > 0:
|
44 |
+
remaining_tasks_to_display -= 1
|
45 |
+
else:
|
46 |
+
displayed_by_default = False
|
47 |
+
auto_eval_column_dict.append((
|
48 |
+
task.name,
|
49 |
+
ColumnContent,
|
50 |
+
create_column_content(
|
51 |
+
task.value.col_name,
|
52 |
+
"number",
|
53 |
+
displayed_by_default,
|
54 |
+
),
|
55 |
+
))
|
56 |
|
57 |
# Add model information columns
|
58 |
+
hide = True
|
59 |
+
display = True
|
60 |
model_info_columns = [
|
61 |
+
("model_type", "Type", "str", not display, hide),
|
62 |
+
("architecture", "Architecture", "str", not display, not hide),
|
63 |
+
("weight_type", "Weight type", "str", not display, hide),
|
64 |
+
("precision", "Precision", "str", not display, not hide),
|
65 |
+
("license", "License", "str", not display, not hide),
|
66 |
+
("params", "Parameters", "number", not display, not hide),
|
67 |
+
("likes", "Likes", "number", not display, hide),
|
68 |
+
("still_on_hub", "HuggingFace Hub", "bool", not display, hide),
|
69 |
+
("revision", "Revision", "str", not display, not hide),
|
70 |
]
|
71 |
|
72 |
for col_name, display_name, col_type, displayed_by_default, *args in model_info_columns:
|