sachinkidzure commited on
Commit
da9726f
·
verified ·
1 Parent(s): 6fb2279

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -124,6 +124,7 @@ with gr.Blocks() as demo:
124
  randomize_seed = gr.Checkbox(label="Randomize Seed", value=False)
125
  guidance_scale = gr.Slider(label="Guidance Scale", minimum=1, maximum=12, step=0.1, value=7.5)
126
  num_inference_steps = gr.Slider(label="Number of Inference Steps", minimum=1, maximum=50, step=1, value=50)
 
127
  run_button = gr.Button("Run")
128
 
129
  with gr.Column():
@@ -136,12 +137,12 @@ with gr.Blocks() as demo:
136
  img = resize_image(img, 1024)
137
  if max(img.shape[0], img.shape[1])*1.0/min(img.shape[0], img.shape[1])>2.0:
138
  raise gr.Error('image aspect ratio cannot be larger than 2.0')
139
- return img, [], None # when new image is uploaded, `selected_points` should be empty
140
 
141
  original_image.upload(
142
  store_img,
143
  [original_image],
144
- [original_image, selected_points]
145
  )
146
 
147
  inputs = [original_image, input_mask, prompt, negative_prompt, blended, invert_mask, control_strength, seed, randomize_seed, guidance_scale, num_inference_steps]
 
124
  randomize_seed = gr.Checkbox(label="Randomize Seed", value=False)
125
  guidance_scale = gr.Slider(label="Guidance Scale", minimum=1, maximum=12, step=0.1, value=7.5)
126
  num_inference_steps = gr.Slider(label="Number of Inference Steps", minimum=1, maximum=50, step=1, value=50)
127
+ #selected_points = gr.State([],label="select points")
128
  run_button = gr.Button("Run")
129
 
130
  with gr.Column():
 
137
  img = resize_image(img, 1024)
138
  if max(img.shape[0], img.shape[1])*1.0/min(img.shape[0], img.shape[1])>2.0:
139
  raise gr.Error('image aspect ratio cannot be larger than 2.0')
140
+ return img, None # when new image is uploaded, `selected_points` should be empty
141
 
142
  original_image.upload(
143
  store_img,
144
  [original_image],
145
+ [original_image]
146
  )
147
 
148
  inputs = [original_image, input_mask, prompt, negative_prompt, blended, invert_mask, control_strength, seed, randomize_seed, guidance_scale, num_inference_steps]