Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,9 @@ if user_image_object is not None:
|
|
28 |
user_image_name = "input_image.png"
|
29 |
|
30 |
#re-encode for streamlit interface
|
31 |
-
#
|
|
|
|
|
32 |
|
33 |
# load image with alpha channel
|
34 |
img = cv2.imread( user_image_object , cv2.IMREAD_UNCHANGED)
|
|
|
28 |
user_image_name = "input_image.png"
|
29 |
|
30 |
#re-encode for streamlit interface
|
31 |
+
#streamlit uploader encodes as a pillow img so we want to save to open in cv2
|
32 |
+
input_image = Image.open( user_image_object )
|
33 |
+
input_image.save(user_image_name )
|
34 |
|
35 |
# load image with alpha channel
|
36 |
img = cv2.imread( user_image_object , cv2.IMREAD_UNCHANGED)
|