ddovidovich commited on
Commit
8b17009
·
1 Parent(s): f05b1cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -142,8 +142,7 @@ 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")
148
  st.image(image,width=1100)
149
 
@@ -182,7 +181,7 @@ if image_file is not None:
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")
 
142
 
143
  image_original = Image.open(image_file)
144
  image=np.asarray(image_original)
145
+ image = convert_rgb(image)
 
146
  st.subheader("Original Image")
147
  st.image(image,width=1100)
148
 
 
181
  st.image(img,width=1100)
182
 
183
  image=np.asarray(image_original)
184
+ image = convert_rgb(image)
185
  if image.shape[1] < 3000:
186
  image = cv2.resize(image,(3100,1150),interpolation=cv2.INTER_LANCZOS4)
187
  predicted=cv2.imread("predict.png")