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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -157,11 +157,11 @@ def tweets_localidad(buscar_localidad):
157
  result.append(etiqueta)
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
 
166
  df_sexista = df[df['Prediccion']=="Sexista"]
167
  df_no_sexista = df[df['Prediccion']=="No Sexista"]
 
157
  result.append(etiqueta)
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(50).style.applymap(color_survived, subset=['Prediccion']))
165
 
166
  df_sexista = df[df['Prediccion']=="Sexista"]
167
  df_no_sexista = df[df['Prediccion']=="No Sexista"]