Update app.py
Browse files
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="
|
| 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 |
-
{ "
|
| 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="
|
| 217 |
-
st.download_button("📥 Download Segmented Images", data=zip_images_buffer, file_name="
|
| 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:
|