t0-0 commited on
Commit
2a731a3
·
verified ·
1 Parent(s): a4f1763

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -68,12 +68,13 @@ def update_table(
68
  type_query: list,
69
  precision_query: str,
70
  size_query: list,
 
71
  show_deleted: bool,
72
  show_merges: bool,
73
  show_flagged: bool,
74
  query: str,
75
  ):
76
- filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted, show_merges, show_flagged)
77
  filtered_df = filter_queries(query, filtered_df)
78
  df = select_columns(filtered_df, columns)
79
  return df
@@ -121,7 +122,7 @@ def filter_queries(query: str, filtered_df: pd.DataFrame):
121
 
122
 
123
  def filter_models(
124
- df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool, show_merges: bool, show_flagged: bool
125
  ) -> pd.DataFrame:
126
  # Show all models
127
  if show_deleted:
@@ -138,6 +139,8 @@ def filter_models(
138
  type_emoji = [t[0] for t in type_query]
139
  filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
140
  filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
 
 
141
 
142
  numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
143
  params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
 
68
  type_query: list,
69
  precision_query: str,
70
  size_query: list,
71
+ add_special_tokens_query: list,
72
  show_deleted: bool,
73
  show_merges: bool,
74
  show_flagged: bool,
75
  query: str,
76
  ):
77
+ filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, add_special_tokens_query, show_deleted, show_merges, show_flagged)
78
  filtered_df = filter_queries(query, filtered_df)
79
  df = select_columns(filtered_df, columns)
80
  return df
 
122
 
123
 
124
  def filter_models(
125
+ df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, add_special_tokens_query: list, show_deleted: bool, show_merges: bool, show_flagged: bool
126
  ) -> pd.DataFrame:
127
  # Show all models
128
  if show_deleted:
 
139
  type_emoji = [t[0] for t in type_query]
140
  filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
141
  filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
142
+ filtered_df = filtered_df.loc[df[AutoEvalColumn.add_special_tokens.name].isin(add_special_tokens_query)]
143
+
144
 
145
  numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
146
  params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")