Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix model size filter
Browse files
app.py
CHANGED
@@ -96,12 +96,11 @@ def filter_models(
|
|
96 |
print(f"After precision filter: {filtered_df.shape}")
|
97 |
|
98 |
# Model Size フィルタリング
|
|
|
|
|
|
|
99 |
if "Unknown" in size_query:
|
100 |
-
size_mask
|
101 |
-
else:
|
102 |
-
size_mask = filtered_df["#Params (B)"].apply(
|
103 |
-
lambda x: any(x in NUMERIC_INTERVALS[s] for s in size_query if s != "Unknown")
|
104 |
-
)
|
105 |
filtered_df = filtered_df[size_mask]
|
106 |
print(f"After size filter: {filtered_df.shape}")
|
107 |
|
|
|
96 |
print(f"After precision filter: {filtered_df.shape}")
|
97 |
|
98 |
# Model Size フィルタリング
|
99 |
+
size_mask = filtered_df["#Params (B)"].apply(
|
100 |
+
lambda x: any(x in NUMERIC_INTERVALS[s] for s in size_query if s != "Unknown")
|
101 |
+
)
|
102 |
if "Unknown" in size_query:
|
103 |
+
size_mask |= filtered_df["#Params (B)"].isna() | (filtered_df["#Params (B)"] == 0)
|
|
|
|
|
|
|
|
|
104 |
filtered_df = filtered_df[size_mask]
|
105 |
print(f"After size filter: {filtered_df.shape}")
|
106 |
|