natolambert commited on
Commit
6ce351e
1 Parent(s): d1c65aa

update model type

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -149,6 +149,15 @@ def prep_df(df):
149
 
150
  # replace "model" with "Model" and "model_type" with "Model Type" and "average" with "Average"
151
  df = df.rename(columns={"model": "Model", "model_type": "Model Type", "average": "Average"})
 
 
 
 
 
 
 
 
 
152
  return df
153
 
154
  # add count column to all dataframes
 
149
 
150
  # replace "model" with "Model" and "model_type" with "Model Type" and "average" with "Average"
151
  df = df.rename(columns={"model": "Model", "model_type": "Model Type", "average": "Average"})
152
+
153
+ # if "Model Type" in columns
154
+ if "Model Type" in df.columns:
155
+ # get model_types that have generative in them
156
+ mask = df["Model Type"].str.contains("generative", case=False, na=False)
157
+
158
+ # set these values to "Generative"
159
+ df.loc[mask, "Model Type"] = "Generative"
160
+
161
  return df
162
 
163
  # add count column to all dataframes