hysts HF staff commited on
Commit
fe7e796
1 Parent(s): 5ec247a
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -109,7 +109,8 @@ def filter_models(
109
  print(f"After precision filter: {df.shape}")
110
 
111
  # Filter by model size
112
- # Note: When `df` is empty, `size_mask` is empty, and the shape of `df[size_mask]` becomes (0, 0)
 
113
  if len(df) > 0:
114
  size_mask = df["#Params (B)"].apply(
115
  lambda x: any(x in NUMERIC_INTERVALS[s] for s in size_query if s != "Unknown")
 
109
  print(f"After precision filter: {df.shape}")
110
 
111
  # Filter by model size
112
+ # Note: When `df` is empty, `size_mask` is empty, and the shape of `df[size_mask]` becomes (0, 0),
113
+ # so we need to check the length of `df` before applying the filter.
114
  if len(df) > 0:
115
  size_mask = df["#Params (B)"].apply(
116
  lambda x: any(x in NUMERIC_INTERVALS[s] for s in size_query if s != "Unknown")