Spaces:
Runtime error
Runtime error
alexrods
commited on
Commit
•
4e0c08c
1
Parent(s):
b38a0df
add model output in app.py
Browse files
app.py
CHANGED
@@ -87,8 +87,17 @@ with col3:
|
|
87 |
if st.button("Corre ejemplo 3"):
|
88 |
file_imagen = examples[2]
|
89 |
|
90 |
-
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
# article = "<div style='text-align: center;'><a href='https://keras.io/examples/vision/deeplabv3_plus/' target='_blank'>Keras example by Praveen Kaushik</a></div>"
|
94 |
# gr.Interface(segmentation, i, o, examples=examples, allow_flagging=False, analytics_enabled=False,
|
|
|
87 |
if st.button("Corre ejemplo 3"):
|
88 |
file_imagen = examples[2]
|
89 |
|
90 |
+
if file_imagen is not None:
|
91 |
+
img = Image.open(file_imagen)
|
92 |
+
|
93 |
+
output = segmentation(img)
|
94 |
+
if output is not None:
|
95 |
+
st.subheader("Segmentacion: ")
|
96 |
+
st.write(output.shape)
|
97 |
+
st.image(output[0], width=850)
|
98 |
+
st.subheader("Mask: ")
|
99 |
+
st.write(output.shape)
|
100 |
+
st.image(output[1], width=850)
|
101 |
|
102 |
# article = "<div style='text-align: center;'><a href='https://keras.io/examples/vision/deeplabv3_plus/' target='_blank'>Keras example by Praveen Kaushik</a></div>"
|
103 |
# gr.Interface(segmentation, i, o, examples=examples, allow_flagging=False, analytics_enabled=False,
|