Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -101,9 +101,6 @@ def main(user_image):
|
|
101 |
init_image.save(user_image.name) # save the resized image
|
102 |
## identify the face + save the inverted mask
|
103 |
inverted_mask = identify_face(user_image)
|
104 |
-
if inverted_mask == None:
|
105 |
-
print("init_image:", type(init_image))
|
106 |
-
return init_image
|
107 |
print("inverted_mask: ", inverted_mask)
|
108 |
fp = tempfile.NamedTemporaryFile(mode='wb', suffix=".png")
|
109 |
cv2.imwrite(fp.name, inverted_mask) # save the inverted image
|
|
|
101 |
init_image.save(user_image.name) # save the resized image
|
102 |
## identify the face + save the inverted mask
|
103 |
inverted_mask = identify_face(user_image)
|
|
|
|
|
|
|
104 |
print("inverted_mask: ", inverted_mask)
|
105 |
fp = tempfile.NamedTemporaryFile(mode='wb', suffix=".png")
|
106 |
cv2.imwrite(fp.name, inverted_mask) # save the inverted image
|