Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,9 @@ def img_prep(paths):
|
|
| 11 |
for i in paths:
|
| 12 |
img = Image.open(i)
|
| 13 |
img = img.resize((256,256))
|
|
|
|
| 14 |
out.append(img)
|
|
|
|
| 15 |
return out
|
| 16 |
|
| 17 |
def model_out(img,model_path):
|
|
@@ -163,6 +165,7 @@ elif selected == 'Projects':
|
|
| 163 |
img_options = {'img1':1, 'img2':2}
|
| 164 |
img_selected_option = st.selectbox('Select an Image', img_options)
|
| 165 |
if img_selected_option == 'img1':
|
|
|
|
| 166 |
st.image(model_out(imgs[0],'Portfolio Projects/FloodAreaSegmentationUnetPix2Pix.h5'),use_column_width=False)
|
| 167 |
if img_selected_option == 'img2':
|
| 168 |
st.image(model_out(imgs[1],'Portfolio Projects/FloodAreaSegmentationUnetPix2Pix.h5'),use_column_width=False)
|
|
|
|
| 11 |
for i in paths:
|
| 12 |
img = Image.open(i)
|
| 13 |
img = img.resize((256,256))
|
| 14 |
+
img = img.convert('RGB')
|
| 15 |
out.append(img)
|
| 16 |
+
st.write(np.shape(img))
|
| 17 |
return out
|
| 18 |
|
| 19 |
def model_out(img,model_path):
|
|
|
|
| 165 |
img_options = {'img1':1, 'img2':2}
|
| 166 |
img_selected_option = st.selectbox('Select an Image', img_options)
|
| 167 |
if img_selected_option == 'img1':
|
| 168 |
+
st.write(np.shape(imgs[0]))
|
| 169 |
st.image(model_out(imgs[0],'Portfolio Projects/FloodAreaSegmentationUnetPix2Pix.h5'),use_column_width=False)
|
| 170 |
if img_selected_option == 'img2':
|
| 171 |
st.image(model_out(imgs[1],'Portfolio Projects/FloodAreaSegmentationUnetPix2Pix.h5'),use_column_width=False)
|