ardaatahan commited on
Commit
27f9e60
1 Parent(s): 1543414

fix spelling and toggling issues

Browse files
Files changed (1) hide show
  1. main.py +26 -11
main.py CHANGED
@@ -299,16 +299,31 @@ def performance_filter(
299
  min_short_toks, max_short_toks = short_toks_slider
300
  min_long_toks, max_long_toks = long_toks_slider
301
 
302
- filtered_df = filtered_df[
303
- (filtered_df["Short-Form Speed"] >= min_short_speed)
304
- & (filtered_df["Short-Form Speed"] <= max_short_speed)
305
- & (filtered_df["Long-Form Speed"] >= min_long_speed)
306
- & (filtered_df["Long-Form Speed"] <= max_long_speed)
307
- & (filtered_df["Short-Form Tok/s"] >= min_short_toks)
308
- & (filtered_df["Short-Form Tok/s"] <= max_short_toks)
309
- & (filtered_df["Long-Form Tok/s"] >= min_long_toks)
310
- & (filtered_df["Long-Form Tok/s"] <= max_long_toks)
311
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
 
313
  return filtered_df
314
 
@@ -1198,7 +1213,7 @@ with gr.Blocks(css=css, theme=gr.themes.Base(font=font)) as demo:
1198
  """
1199
  ### Legend
1200
  - ✅ Supported: The model is supported and tested on this device.
1201
- - ⚠️ Failed: Either The model tests failed on this device or the Speed Factor for the test is less than 1.
1202
  - ? Not Tested: The model is supported on this device but no test information available.
1203
  - Not Supported: The model is not supported on this device as per the [WhisperKit configuration](https://huggingface.co/argmaxinc/whisperkit-coreml/blob/main/config.json).
1204
  """
 
299
  min_short_toks, max_short_toks = short_toks_slider
300
  min_long_toks, max_long_toks = long_toks_slider
301
 
302
+ df["Short-Form Speed"] = pd.to_numeric(df["Short-Form Speed"], errors="coerce")
303
+ df["Long-Form Speed"] = pd.to_numeric(df["Long-Form Speed"], errors="coerce")
304
+ df["Short-Form Tok/s"] = pd.to_numeric(df["Short-Form Tok/s"], errors="coerce")
305
+ df["Long-Form Tok/s"] = pd.to_numeric(df["Long-Form Tok/s"], errors="coerce")
306
+
307
+ if "Short-Form Speed" in filtered_df.columns:
308
+ filtered_df = filtered_df[
309
+ (filtered_df["Short-Form Speed"] >= min_short_speed)
310
+ & (filtered_df["Short-Form Speed"] <= max_short_speed)
311
+ ]
312
+ if "Long-Form Speed" in filtered_df.columns:
313
+ filtered_df = filtered_df[
314
+ (filtered_df["Long-Form Speed"] >= min_long_speed)
315
+ & (filtered_df["Long-Form Speed"] <= max_long_speed)
316
+ ]
317
+ if "Short-Form Tok/s" in filtered_df.columns:
318
+ filtered_df = filtered_df[
319
+ (filtered_df["Short-Form Tok/s"] >= min_short_toks)
320
+ & (filtered_df["Short-Form Tok/s"] <= max_short_toks)
321
+ ]
322
+ if "Long-Form Tok/s" in filtered_df.columns:
323
+ filtered_df = filtered_df[
324
+ (filtered_df["Long-Form Tok/s"] >= min_long_toks)
325
+ & (filtered_df["Long-Form Tok/s"] <= max_long_toks)
326
+ ]
327
 
328
  return filtered_df
329
 
 
1213
  """
1214
  ### Legend
1215
  - ✅ Supported: The model is supported and tested on this device.
1216
+ - ⚠️ Failed: Either the model tests failed on this device or the Speed Factor for the test is less than 1.
1217
  - ? Not Tested: The model is supported on this device but no test information available.
1218
  - Not Supported: The model is not supported on this device as per the [WhisperKit configuration](https://huggingface.co/argmaxinc/whisperkit-coreml/blob/main/config.json).
1219
  """