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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -28,12 +28,12 @@ if user_image_object is not None:
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)
37
 
38
  # extract alpha channel
39
  #alpha = img[:,:,3]
 
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 (converting directly is a pain)
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_name , cv2.IMREAD_UNCHANGED)
37
 
38
  # extract alpha channel
39
  #alpha = img[:,:,3]