Spaces:
Runtime error
Runtime error
lily-phoo-95
commited on
Commit
·
1810610
1
Parent(s):
14ff150
modify app file
Browse files
app.py
CHANGED
@@ -68,11 +68,8 @@ def segment_image(input_image):
|
|
68 |
output_image = cv2.imread('output_figure.png')
|
69 |
return Image.fromarray(output_image)
|
70 |
|
71 |
-
## Manipularemos la interfaz para que podamos usar imágenes ejemplo
|
72 |
-
## Si el usuario da click en un ejemplo entonces el modelo correrá con él
|
73 |
-
images = ["sample.jpg"]
|
74 |
file = st.file_uploader("Upload File", type=["png", "jpg", "jpeg"])
|
75 |
-
|
76 |
col1, col2 = st.columns(2)
|
77 |
with col1:
|
78 |
input = Image.open('sample.jpg')
|
@@ -82,7 +79,7 @@ with col1:
|
|
82 |
|
83 |
with col2:
|
84 |
output = segment_image(input)
|
85 |
-
|
86 |
|
87 |
if file is not None:
|
88 |
input = file
|
|
|
68 |
output_image = cv2.imread('output_figure.png')
|
69 |
return Image.fromarray(output_image)
|
70 |
|
|
|
|
|
|
|
71 |
file = st.file_uploader("Upload File", type=["png", "jpg", "jpeg"])
|
72 |
+
|
73 |
col1, col2 = st.columns(2)
|
74 |
with col1:
|
75 |
input = Image.open('sample.jpg')
|
|
|
79 |
|
80 |
with col2:
|
81 |
output = segment_image(input)
|
82 |
+
st.image(output)
|
83 |
|
84 |
if file is not None:
|
85 |
input = file
|