Joshua1808 commited on
Commit
8109036
·
1 Parent(s): 3412472

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -158,7 +158,8 @@ def tweets_localidad(buscar_localidad):
158
  df = pd.DataFrame(result)
159
  df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
160
  df['Probabilidad'] = df['Probabilidad'].apply(lambda x: '{:.2f}%'.format(x))
161
- df.sort_values(by='Probabilidad', ascending=False, inplace=True)
 
162
  #df=df[df["Prediccion"] == 'Sexista']
163
  tabla = st.table(df.reset_index(drop=True).head(30).style.applymap(color_survived, subset=['Prediccion']))
164
 
 
158
  df = pd.DataFrame(result)
159
  df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
160
  df['Probabilidad'] = df['Probabilidad'].apply(lambda x: '{:.2f}%'.format(x))
161
+ #df.sort_values(by='Probabilidad', ascending=False, inplace=True)
162
+ df = df.sort_values(by=['Probabilidad', 'Prediccion'], ascending=[False, False])
163
  #df=df[df["Prediccion"] == 'Sexista']
164
  tabla = st.table(df.reset_index(drop=True).head(30).style.applymap(color_survived, subset=['Prediccion']))
165