Update app.py
Browse files
app.py
CHANGED
|
@@ -159,7 +159,7 @@ if upload_option == "Single image":
|
|
| 159 |
if not result["SemSegmentacao"]:
|
| 160 |
st.image(result["Segmentada"], caption="Segmentation", use_container_width=True)
|
| 161 |
st.image(result["Poligono"], caption="Polygon", use_container_width=True)
|
| 162 |
-
st.write(f"📏 **Segmented Area:** {result['Área Segmentada (px²)']:.2f} pixels
|
| 163 |
else:
|
| 164 |
st.warning("⚠️ No segmentation was detected in this image.")
|
| 165 |
|
|
@@ -182,7 +182,7 @@ elif upload_option == "Image folder":
|
|
| 182 |
if not result["SemSegmentacao"]:
|
| 183 |
st.image(result["Segmentada"], caption="Segmentation", use_container_width=True)
|
| 184 |
st.image(result["Poligono"], caption="Polygon", use_container_width=True)
|
| 185 |
-
st.write(f"📏 **Segmented Area:** {result[
|
| 186 |
zip_file.writestr(f"segmentada_{result['Imagem']}.png", result["Segmentada"].getvalue())
|
| 187 |
zip_file.writestr(f"poligono_{result['Imagem']}.png", result["Poligono"].getvalue())
|
| 188 |
|
|
|
|
| 159 |
if not result["SemSegmentacao"]:
|
| 160 |
st.image(result["Segmentada"], caption="Segmentation", use_container_width=True)
|
| 161 |
st.image(result["Poligono"], caption="Polygon", use_container_width=True)
|
| 162 |
+
st.write(f"📏 **Segmented Area:** {result['Área Segmentada (px²)']:.2f} pixels²")
|
| 163 |
else:
|
| 164 |
st.warning("⚠️ No segmentation was detected in this image.")
|
| 165 |
|
|
|
|
| 182 |
if not result["SemSegmentacao"]:
|
| 183 |
st.image(result["Segmentada"], caption="Segmentation", use_container_width=True)
|
| 184 |
st.image(result["Poligono"], caption="Polygon", use_container_width=True)
|
| 185 |
+
st.write(f"📏 **Segmented Area:** {result['Área Segmentada (px²)']:.2f} pixels²")
|
| 186 |
zip_file.writestr(f"segmentada_{result['Imagem']}.png", result["Segmentada"].getvalue())
|
| 187 |
zip_file.writestr(f"poligono_{result['Imagem']}.png", result["Poligono"].getvalue())
|
| 188 |
|