Joshua1808 commited on
Commit
bdb23ce
·
1 Parent(s): bfaa73e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -157,10 +157,9 @@ def tweets_localidad(buscar_localidad):
157
  df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
158
  df['Probabilidad'] = df['Probabilidad'].round(3)
159
 
160
- tab1, tab2 = st.tabs(["📈 Chart", "🗃 Data"])
161
- tab1.subheader("Datos")
162
- muestra = st.table(df.reset_index(drop=True).head(5).style.applymap(color_survived, subset=['Prediccion']))
163
- tab1.write(muestra)
164
  tab2.subheader("Gráfico")
165
  resultado = df['Prediccion'].value_counts()
166
  colores=["#EE3555","#aae977"]
@@ -171,10 +170,10 @@ def tweets_localidad(buscar_localidad):
171
  plt.rcParams.update({'font.size':4, 'font.weight':'bold'})
172
  ax.legend()
173
  # Muestra el gráfico
174
- #plt.show()
175
- #st.set_option('deprecation.showPyplotGlobalUse', False)
176
  #st.pyplot()
177
- st.pyplot()
178
 
179
 
180
  except AttributeError as e:
 
157
  df['Prediccion'] = np.where(df['Prediccion'] == 'LABEL_1', 'Sexista', 'No Sexista')
158
  df['Probabilidad'] = df['Probabilidad'].round(3)
159
 
160
+ tab1, tab2 = st.tabs(["🗃 Data","📈 Chart"])
161
+ tab1.st.table(df.reset_index(drop=True).head(5).style.applymap(color_survived, subset=['Prediccion']))
162
+
 
163
  tab2.subheader("Gráfico")
164
  resultado = df['Prediccion'].value_counts()
165
  colores=["#EE3555","#aae977"]
 
170
  plt.rcParams.update({'font.size':4, 'font.weight':'bold'})
171
  ax.legend()
172
  # Muestra el gráfico
173
+ plt.show()
174
+ st.set_option('deprecation.showPyplotGlobalUse', False)
175
  #st.pyplot()
176
+
177
 
178
 
179
  except AttributeError as e: