Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,6 +103,8 @@ def preprocess_mask(mask):
|
|
103 |
# output the sampled images
|
104 |
def main(user_image):
|
105 |
# accept the image as input
|
|
|
|
|
106 |
decodeImage(data, user_image.name)
|
107 |
init_image = PIL.Image.open(user_image).convert("RGB")
|
108 |
# # resize the image to be (512, 512)
|
|
|
103 |
# output the sampled images
|
104 |
def main(user_image):
|
105 |
# accept the image as input
|
106 |
+
with open(user_image, 'rb') as f:
|
107 |
+
data = f.read()
|
108 |
decodeImage(data, user_image.name)
|
109 |
init_image = PIL.Image.open(user_image).convert("RGB")
|
110 |
# # resize the image to be (512, 512)
|