Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -93,7 +93,6 @@ def preprocess_mask(mask):
|
|
93 |
def main(user_image):
|
94 |
# accept the image as input
|
95 |
init_image = PIL.Image.open(user_image)
|
96 |
-
init_image = init_image.rotate(-90)
|
97 |
# # resize the image to be (512, 512)
|
98 |
newsize = (512, 512)
|
99 |
init_image = init_image.resize(newsize)
|
@@ -108,5 +107,5 @@ def main(user_image):
|
|
108 |
# sample the new
|
109 |
return sample_images(init_image, pil_inverted_mask)
|
110 |
|
111 |
-
demo = gr.Interface(main, gr.
|
112 |
demo.launch(debug=True)
|
|
|
93 |
def main(user_image):
|
94 |
# accept the image as input
|
95 |
init_image = PIL.Image.open(user_image)
|
|
|
96 |
# # resize the image to be (512, 512)
|
97 |
newsize = (512, 512)
|
98 |
init_image = init_image.resize(newsize)
|
|
|
107 |
# sample the new
|
108 |
return sample_images(init_image, pil_inverted_mask)
|
109 |
|
110 |
+
demo = gr.Interface(main, gr.File(), "image")
|
111 |
demo.launch(debug=True)
|