mlabonne commited on
Commit
c1b4827
1 Parent(s): cdb518a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -112,15 +112,20 @@ def main():
112
  with col2:
113
  show_mistral = st.checkbox("Mistral (7B)", value=True)
114
 
115
- # Apply filters based on toggles
 
116
  if show_phi:
117
- df = df.append(full_df[full_df['tags'].str.lower().str.contains('phi-msft')], ignore_index=True)
118
  if show_mistral:
119
- df = df.append(full_df[full_df['tags'].str.lower().str.contains('mistral')], ignore_index=True)
120
-
 
 
 
 
121
  # Sort values
122
  df = df.sort_values(by='Average', ascending=False)
123
-
124
  # Display the DataFrame
125
  st.dataframe(df[['Model'] + score_columns + ['Likes']], use_container_width=True)
126
 
 
112
  with col2:
113
  show_mistral = st.checkbox("Mistral (7B)", value=True)
114
 
115
+ dfs_to_concat = []
116
+
117
  if show_phi:
118
+ dfs_to_concat.append(full_df[full_df['tags'].str.lower().str.contains('phi-msft')])
119
  if show_mistral:
120
+ dfs_to_concat.append(full_df[full_df['tags'].str.lower().str.contains('mistral')])
121
+
122
+ # Concatenate the DataFrames
123
+ if dfs_to_concat:
124
+ df = pd.concat(dfs_to_concat, ignore_index=True)
125
+
126
  # Sort values
127
  df = df.sort_values(by='Average', ascending=False)
128
+
129
  # Display the DataFrame
130
  st.dataframe(df[['Model'] + score_columns + ['Likes']], use_container_width=True)
131