nmariotto commited on
Commit
7b67a05
·
verified ·
1 Parent(s): ea8882e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -170,7 +170,7 @@ if upload_option == "Single image":
170
  st.download_button(
171
  label="📥 Download Segmented Image",
172
  data=result["Segmentada"],
173
- file_name="imagem_segmentada.png",
174
  mime="image/png"
175
  )
176
  else:
@@ -203,7 +203,7 @@ elif upload_option == "Image folder":
203
 
204
  if results:
205
  df = pd.DataFrame([
206
- { "Imagem": r["Imagem"], "Área Segmentada (px²)": r["Área Segmentada (px²)"] if not r["SemSegmentacao"] else "Sem Segmentação" }
207
  for r in results
208
  ])
209
  st.markdown("### 📊 Results Table")
@@ -213,8 +213,8 @@ elif upload_option == "Image folder":
213
  df.to_excel(excel_buffer, index=False)
214
  excel_buffer.seek(0)
215
 
216
- st.download_button("📥 Download Table (Excel)", data=excel_buffer, file_name="resultados_segmentacao.xlsx", mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
217
- st.download_button("📥 Download Segmented Images", data=zip_images_buffer, file_name="imagens_segmentadas.zip", mime="application/zip")
218
 
219
  # 📝 Manual Feedback
220
  if results:
 
170
  st.download_button(
171
  label="📥 Download Segmented Image",
172
  data=result["Segmentada"],
173
+ file_name="segmented_images.png",
174
  mime="image/png"
175
  )
176
  else:
 
203
 
204
  if results:
205
  df = pd.DataFrame([
206
+ { "Image": r["Imagem"], "Segmented Area (px²)": r["Área Segmentada (px²)"] if not r["SemSegmentacao"] else "No Segmentation" }
207
  for r in results
208
  ])
209
  st.markdown("### 📊 Results Table")
 
213
  df.to_excel(excel_buffer, index=False)
214
  excel_buffer.seek(0)
215
 
216
+ st.download_button("📥 Download Table (Excel)", data=excel_buffer, file_name="segmentation_results.xlsx", mime="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
217
+ st.download_button("📥 Download Segmented Images", data=zip_images_buffer, file_name="segmented_images.zip", mime="application/zip")
218
 
219
  # 📝 Manual Feedback
220
  if results: