jiangyzy commited on
Commit
ac9cb8b
1 Parent(s): 622dbe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -194,7 +194,9 @@ def run_generation(sampler, input_image, x0, y0, x1, y1, polar, azimuth, text, s
194
 
195
  output_image = Image.fromarray(x_samples)
196
 
197
- return output_image
 
 
198
 
199
 
200
  def load_example(input_image, x0, y0, x1, y1, polar, azimuth, prompt):
@@ -283,7 +285,7 @@ def main(args):
283
  # start.click(partial(run_generation, sampler, model, device),
284
  start.click(partial(run_generation, sampler),
285
  inputs=[input_image, x0, y0, x1, y1, polar, azimuth, prompt, seed],
286
- outputs=output_image)
287
 
288
 
289
  # demo.launch(server_name='0.0.0.0', share=False, server_port=args.port)
 
194
 
195
  output_image = Image.fromarray(x_samples)
196
 
197
+ x0, y0, x1, y1, image_location = adjust_location(x0, y0, x1, y1, input_image)
198
+
199
+ return x0, y0, x1, y1, image_location, output_image
200
 
201
 
202
  def load_example(input_image, x0, y0, x1, y1, polar, azimuth, prompt):
 
285
  # start.click(partial(run_generation, sampler, model, device),
286
  start.click(partial(run_generation, sampler),
287
  inputs=[input_image, x0, y0, x1, y1, polar, azimuth, prompt, seed],
288
+ outputs=[x0, y0, x1, y1, location_image, output_image])
289
 
290
 
291
  # demo.launch(server_name='0.0.0.0', share=False, server_port=args.port)