GDavila commited on
Commit
d52395d
1 Parent(s): fa34b93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- #user_image_object.save(user_image_name )
 
 
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)