T.Masuda commited on
Commit
3a11aa8
·
1 Parent(s): e099429

update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -15,8 +15,8 @@ def process_image(foreImg, flip, backImg, left, top, width, height, isLoc):
15
  if isLoc:
16
  if backImg is None:
17
  return None
18
- rect = ImageDraw.Draw(backImg)
19
- rect.rectangle([(left, top), (imwidth + left, imheight + top)], outline=(255, 0, 0), width=4)
20
  return backImg
21
 
22
  image = remove(foreImg)
@@ -31,6 +31,7 @@ def process_image(foreImg, flip, backImg, left, top, width, height, isLoc):
31
  return backImg
32
 
33
  app = gr.Interface(
 
34
  fn=process_image,
35
  inputs=[
36
  gr.Image(label='foreground', type='pil'),
@@ -42,8 +43,6 @@ app = gr.Interface(
42
  gr.Slider(maximum=4000, step=1, label='height'),
43
  gr.Checkbox(label='check location only'),
44
  ],
45
- title='combine images',
46
- description='combine images',
47
  outputs='image',
48
  allow_flagging='never',
49
  examples=[['examples/foreground.jpg', False, 'examples/background.jpg', 720, 540, 256, 256, False]],
 
15
  if isLoc:
16
  if backImg is None:
17
  return None
18
+ draw = ImageDraw.Draw(backImg)
19
+ draw.rectangle([(left, top), (imwidth + left, imheight + top)], outline=(255, 0, 0), width=4)
20
  return backImg
21
 
22
  image = remove(foreImg)
 
31
  return backImg
32
 
33
  app = gr.Interface(
34
+ title='Combine Images',
35
  fn=process_image,
36
  inputs=[
37
  gr.Image(label='foreground', type='pil'),
 
43
  gr.Slider(maximum=4000, step=1, label='height'),
44
  gr.Checkbox(label='check location only'),
45
  ],
 
 
46
  outputs='image',
47
  allow_flagging='never',
48
  examples=[['examples/foreground.jpg', False, 'examples/background.jpg', 720, 540, 256, 256, False]],