haoyang commited on
Commit
df8d8ab
1 Parent(s): f7c75ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -52,10 +52,9 @@ def update_table(
52
  type_query: list,
53
  precision_query: str,
54
  size_query: list,
55
- show_deleted: bool,
56
  query: str,
57
  ):
58
- filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted)
59
  filtered_df = filter_queries(query, filtered_df)
60
  df = select_columns(filtered_df, columns)
61
  return df
@@ -97,13 +96,10 @@ def filter_queries(query: str, filtered_df: pd.DataFrame) -> pd.DataFrame:
97
 
98
 
99
  def filter_models(
100
- df: pd.DataFrame, type_query: list, size_query: list, precision_query: list, show_deleted: bool
101
  ) -> pd.DataFrame:
102
  # Show all models
103
- if show_deleted:
104
- filtered_df = df
105
- else: # Show only still on the hub models
106
- filtered_df = df[df[AutoEvalColumn.still_on_hub.name] == True]
107
 
108
  type_emoji = [t[0] for t in type_query]
109
  filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
 
52
  type_query: list,
53
  precision_query: str,
54
  size_query: list,
 
55
  query: str,
56
  ):
57
+ filtered_df = filter_models(hidden_df, type_query, size_query, precision_query)
58
  filtered_df = filter_queries(query, filtered_df)
59
  df = select_columns(filtered_df, columns)
60
  return df
 
96
 
97
 
98
  def filter_models(
99
+ df: pd.DataFrame, type_query: list, size_query: list, precision_query: list
100
  ) -> pd.DataFrame:
101
  # Show all models
102
+ filtered_df = df.copy()
 
 
 
103
 
104
  type_emoji = [t[0] for t in type_query]
105
  filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]