Spaces:
Sleeping
Sleeping
ddovidovich
commited on
Commit
·
f05b1cf
1
Parent(s):
32391ba
Update app.py
Browse files
app.py
CHANGED
@@ -140,9 +140,8 @@ with col4:
|
|
140 |
|
141 |
if image_file is not None:
|
142 |
|
143 |
-
|
144 |
-
image
|
145 |
-
image=np.asarray(image)
|
146 |
if len(image.shape) == 2:
|
147 |
image = cv2.cvtColor(image,cv2.COLOR_GRAY2RGB)
|
148 |
st.subheader("Original Image")
|
@@ -182,7 +181,8 @@ if image_file is not None:
|
|
182 |
st.write(img.shape)
|
183 |
st.image(img,width=1100)
|
184 |
|
185 |
-
image=np.asarray(
|
|
|
186 |
if image.shape[1] < 3000:
|
187 |
image = cv2.resize(image,(3100,1150),interpolation=cv2.INTER_LANCZOS4)
|
188 |
predicted=cv2.imread("predict.png")
|
|
|
140 |
|
141 |
if image_file is not None:
|
142 |
|
143 |
+
image_original = Image.open(image_file)
|
144 |
+
image=np.asarray(image_original)
|
|
|
145 |
if len(image.shape) == 2:
|
146 |
image = cv2.cvtColor(image,cv2.COLOR_GRAY2RGB)
|
147 |
st.subheader("Original Image")
|
|
|
181 |
st.write(img.shape)
|
182 |
st.image(img,width=1100)
|
183 |
|
184 |
+
image=np.asarray(image_original)
|
185 |
+
image = cv2.cvtColor(image,cv2.COLOR_GRAY2RGB)
|
186 |
if image.shape[1] < 3000:
|
187 |
image = cv2.resize(image,(3100,1150),interpolation=cv2.INTER_LANCZOS4)
|
188 |
predicted=cv2.imread("predict.png")
|