Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update utils.py
Browse files
utils.py
CHANGED
@@ -148,7 +148,7 @@ def search_and_filter_models(df, query, min_size, max_size):
|
|
148 |
if query:
|
149 |
df = df[df['Models'].str.contains(query, case=False, na=False)]
|
150 |
|
151 |
-
df = df[(df['Model Size'] >= min_size) & (df['Model Size'] <= max_size)]
|
152 |
|
153 |
return df
|
154 |
|
@@ -160,7 +160,7 @@ def search_models(df, query):
|
|
160 |
|
161 |
|
162 |
def get_size_range(df):
|
163 |
-
sizes = df['Model Size'].dropna()
|
164 |
if len(sizes) > 0:
|
165 |
return float(sizes.min()), float(sizes.max())
|
166 |
return 0, 500
|
|
|
148 |
if query:
|
149 |
df = df[df['Models'].str.contains(query, case=False, na=False)]
|
150 |
|
151 |
+
df = df[(df['Model Size(B)'] >= min_size) & (df['Model Size(B)'] <= max_size)]
|
152 |
|
153 |
return df
|
154 |
|
|
|
160 |
|
161 |
|
162 |
def get_size_range(df):
|
163 |
+
sizes = df['Model Size(B)'].dropna()
|
164 |
if len(sizes) > 0:
|
165 |
return float(sizes.min()), float(sizes.max())
|
166 |
return 0, 500
|