hysts HF staff commited on
Commit
3a6aabe
·
1 Parent(s): 3203d16

Fix model size filter

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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 = filtered_df["#Params (B)"].isna() | (filtered_df["#Params (B)"] == 0)
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