Joshua1808 commited on
Commit
a7ff4ae
·
1 Parent(s): 6de011c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -133,10 +133,10 @@ def tweets_localidad(buscar_localidad):
133
  for predic in prediction:
134
  etiqueta = {'Tweets': datos,'Prediccion': predic['label'], 'Probabilidad': predic['score']}
135
  result.append(etiqueta)
 
136
  if df.empty:
137
  st.text("No se encontraron tweets sexistas dentro de la localidad")
138
  else:
139
- df = pd.DataFrame(result)
140
  df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
141
  df = df[df["Prediccion"] == 'Sexista']
142
  df = df[df["Probabilidad"] > 0.5]
 
133
  for predic in prediction:
134
  etiqueta = {'Tweets': datos,'Prediccion': predic['label'], 'Probabilidad': predic['score']}
135
  result.append(etiqueta)
136
+ df = pd.DataFrame(result)
137
  if df.empty:
138
  st.text("No se encontraron tweets sexistas dentro de la localidad")
139
  else:
 
140
  df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
141
  df = df[df["Prediccion"] == 'Sexista']
142
  df = df[df["Probabilidad"] > 0.5]