de-Rodrigo commited on
Commit
a254745
·
2 Parent(s): f392d35 89846e2

Merge branch 'main' of https://huggingface.co/spaces/de-Rodrigo/Embeddings

Browse files
Files changed (1) hide show
  1. app.py +0 -33
app.py CHANGED
@@ -1285,39 +1285,6 @@ def run_model(model_name):
1285
 
1286
  # Mostrar el heatmap en la app
1287
  st.bokeh_chart(heatmap_fig)
1288
-
1289
- # # Guardar la figura y el nombre correspondiente
1290
- # heatmap_figures.append(heatmap_fig)
1291
- # heatmap_names.append(f"heatmap_{selected_feature}_{x_comp}_vs_{y_comp}.png")
1292
-
1293
-
1294
- # # Inicializar el driver de Chrome en modo headless
1295
- # chrome_options = Options()
1296
- # chrome_options.add_argument("--headless")
1297
- # chrome_options.add_argument("--no-sandbox")
1298
- # chrome_options.add_argument("--disable-dev-shm-usage")
1299
- # driver = webdriver.Chrome(options=chrome_options, service=ChromeService(ChromeDriverManager().install()))
1300
-
1301
- # if st.button("Descargar todos los heatmaps"):
1302
- # zip_buffer = io.BytesIO()
1303
- # with tempfile.TemporaryDirectory() as tmpdirname:
1304
- # with zipfile.ZipFile(zip_buffer, "w", zipfile.ZIP_DEFLATED) as zip_file:
1305
- # # Exporta cada figura a PNG y añádela al ZIP
1306
- # for fig, filename in zip(heatmap_figures, heatmap_names):
1307
- # tmp_path = f"{tmpdirname}/{filename}"
1308
- # export_png(fig, filename=tmp_path, driver=driver)
1309
- # with open(tmp_path, "rb") as f:
1310
- # zip_file.writestr(filename, f.read())
1311
- # zip_buffer.seek(0)
1312
- # st.download_button(
1313
- # label="Descargar ZIP de heatmaps",
1314
- # data=zip_buffer,
1315
- # file_name="heatmaps.zip",
1316
- # mime="application/zip",
1317
- # key=f"download_heatmaps_{model_name}"
1318
- # )
1319
-
1320
- # driver.quit()
1321
 
1322
 
1323
  def main():
 
1285
 
1286
  # Mostrar el heatmap en la app
1287
  st.bokeh_chart(heatmap_fig)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1288
 
1289
 
1290
  def main():