Madhavan Iyengar
commited on
Commit
•
b09d195
1
Parent(s):
b5bca51
fix filtering
Browse files- app.py +6 -4
- src/display/utils.py +6 -6
app.py
CHANGED
@@ -130,10 +130,12 @@ def filter_models(
|
|
130 |
df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool
|
131 |
) -> pd.DataFrame:
|
132 |
# Show all models
|
133 |
-
if show_deleted:
|
134 |
-
|
135 |
-
else: # Show only still on the hub models
|
136 |
-
|
|
|
|
|
137 |
|
138 |
type_emoji = [t[0] for t in type_query]
|
139 |
filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
|
|
|
130 |
df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool
|
131 |
) -> pd.DataFrame:
|
132 |
# Show all models
|
133 |
+
# if show_deleted:
|
134 |
+
# filtered_df = df
|
135 |
+
# else: # Show only still on the hub models
|
136 |
+
# filtered_df = df[df[AutoEvalColumn.still_on_hub.name] == True]
|
137 |
+
|
138 |
+
filtered_df = df
|
139 |
|
140 |
type_emoji = [t[0] for t in type_query]
|
141 |
filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
|
src/display/utils.py
CHANGED
@@ -32,14 +32,14 @@ auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "ma
|
|
32 |
for task in Tasks:
|
33 |
auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
|
34 |
# Model information
|
35 |
-
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", True)])
|
36 |
-
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", True)])
|
37 |
-
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str",
|
38 |
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", True)])
|
39 |
-
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", True)])
|
40 |
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", True)])
|
41 |
-
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", True)])
|
42 |
-
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", True)])
|
43 |
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, True)])
|
44 |
|
45 |
# We use make dataclass to dynamically fill the scores from Tasks
|
|
|
32 |
for task in Tasks:
|
33 |
auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
|
34 |
# Model information
|
35 |
+
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False, True)])
|
36 |
+
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False, True)])
|
37 |
+
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
|
38 |
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", True)])
|
39 |
+
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False, True)])
|
40 |
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", True)])
|
41 |
+
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False, True)])
|
42 |
+
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False, True)])
|
43 |
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, True)])
|
44 |
|
45 |
# We use make dataclass to dynamically fill the scores from Tasks
|