animrods commited on
Commit
855c6c3
·
verified ·
1 Parent(s): db73a2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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", height=400, crop_size="1:1")
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