ddovidovich
commited on
Commit
·
3d60775
1
Parent(s):
509404a
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,9 +147,10 @@ with col4:
|
|
| 147 |
if image_file is not None:
|
| 148 |
|
| 149 |
#image=cv2.imread(image_file)
|
| 150 |
-
image = Image.open(image_file)
|
| 151 |
image=np.asarray(image)
|
| 152 |
-
|
|
|
|
| 153 |
st.subheader("Original Image")
|
| 154 |
st.image(image,width=1100)
|
| 155 |
|
|
|
|
| 147 |
if image_file is not None:
|
| 148 |
|
| 149 |
#image=cv2.imread(image_file)
|
| 150 |
+
image = Image.open(image_file)
|
| 151 |
image=np.asarray(image)
|
| 152 |
+
if len(image_np.shape) == 2:
|
| 153 |
+
image = cv2.cvtColor(image,cv2.COLOR_GRAY2RGB)
|
| 154 |
st.subheader("Original Image")
|
| 155 |
st.image(image,width=1100)
|
| 156 |
|