Joshua1808 commited on
Commit
12f1886
·
1 Parent(s): 9fd97ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -133,10 +133,10 @@ def tweets_localidad(buscar_localidad):
133
  for predic in prediction:
134
  etiqueta = {'Tweets': text,'Prediccion': predic['label'], 'Probabilidad': predic['score']}
135
  result.append(etiqueta)
136
- df['Prediccion'] = np.where( df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
 
137
  df = df[df["Prediccion"] == 'Sexista']
138
  df = df[df["Probabilidad"] > 0.80]
139
- df = pd.DataFrame(result)
140
  muestra = st.table(df.reset_index(drop=True).head(5).style.applymap(color_survived, subset=['Prediccion']))
141
  tabla.append(muestra)
142
  resultado=df.groupby('Prediccion')['Probabilidad'].sum()
 
133
  for predic in prediction:
134
  etiqueta = {'Tweets': text,'Prediccion': predic['label'], 'Probabilidad': predic['score']}
135
  result.append(etiqueta)
136
+ df = pd.DataFrame(result)
137
+ df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
138
  df = df[df["Prediccion"] == 'Sexista']
139
  df = df[df["Probabilidad"] > 0.80]
 
140
  muestra = st.table(df.reset_index(drop=True).head(5).style.applymap(color_survived, subset=['Prediccion']))
141
  tabla.append(muestra)
142
  resultado=df.groupby('Prediccion')['Probabilidad'].sum()