Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,8 @@ def predict(image, prompt="high quality, best quality", negative_prompt="", guid
|
|
30 |
if negative_prompt == "":
|
31 |
negative_prompt = None
|
32 |
|
33 |
-
init_image = image.convert("RGB")
|
|
|
34 |
# if center_crop is False:
|
35 |
# init_image = init_image.resize((224, 224))
|
36 |
|
@@ -100,7 +101,7 @@ with image_blocks as demo:
|
|
100 |
''')
|
101 |
with gr.Row():
|
102 |
with gr.Column():
|
103 |
-
image = gr.ImageEditor(elem_id="image_upload", type="pil", label="Upload"
|
104 |
# image = gr.Image(sources=None, type="pil") # None for upload, ctrl+v and webcam
|
105 |
|
106 |
|
|
|
30 |
if negative_prompt == "":
|
31 |
negative_prompt = None
|
32 |
|
33 |
+
init_image = image['image'].convert("RGB")
|
34 |
+
# init_image = image.convert("RGB")
|
35 |
# if center_crop is False:
|
36 |
# init_image = init_image.resize((224, 224))
|
37 |
|
|
|
101 |
''')
|
102 |
with gr.Row():
|
103 |
with gr.Column():
|
104 |
+
image = gr.ImageEditor(elem_id="image_upload", type="pil", label="Upload")
|
105 |
# image = gr.Image(sources=None, type="pil") # None for upload, ctrl+v and webcam
|
106 |
|
107 |
|