Ahsen Khaliq commited on
Commit
8ce9b88
1 Parent(s): fa61350

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,7 +9,6 @@ from PIL import Image
9
  import numpy as np
10
  os.mkdir("data")
11
  os.mkdir("dataout")
12
- torch.hub.download_url_to_file('https://images.pexels.com/photos/103123/pexels-photo-103123.jpeg', 'person.jpeg')
13
  model = hub.Module(name='U2Net')
14
  def infer(img):
15
  img.save("./data/data.png")
@@ -30,9 +29,9 @@ def infer(img):
30
  inputs = gr.inputs.Image(type='pil', label="Original Image")
31
  outputs = gr.outputs.Image(type="file",label="output")
32
  title = "LaMa Image Inpainting"
33
- description = "Gradio demo for LaMa: Resolution-robust Large Mask Inpainting with Fourier Convolutions. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below. Masks are generated by <a href='https://huggingface.co/spaces/akhaliq/U-2-Net' target='_blank'>U^2net</a>"
34
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.07161' target='_blank'>Resolution-robust Large Mask Inpainting with Fourier Convolutions</a> | <a href='https://github.com/saic-mdal/lama' target='_blank'>Github Repo</a></p>"
35
  examples = [
36
- ['person.jpeg']
37
  ]
38
  gr.Interface(infer, inputs, outputs, title=title, description=description, article=article, examples=examples, enable_queue=True).launch()
 
9
  import numpy as np
10
  os.mkdir("data")
11
  os.mkdir("dataout")
 
12
  model = hub.Module(name='U2Net')
13
  def infer(img):
14
  img.save("./data/data.png")
 
29
  inputs = gr.inputs.Image(type='pil', label="Original Image")
30
  outputs = gr.outputs.Image(type="file",label="output")
31
  title = "LaMa Image Inpainting"
32
+ description = "Gradio demo for LaMa: Resolution-robust Large Mask Inpainting with Fourier Convolutions. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below. Masks are generated by U^2net"
33
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2109.07161' target='_blank'>Resolution-robust Large Mask Inpainting with Fourier Convolutions</a> | <a href='https://github.com/saic-mdal/lama' target='_blank'>Github Repo</a></p>"
34
  examples = [
35
+ ['person512.png']
36
  ]
37
  gr.Interface(infer, inputs, outputs, title=title, description=description, article=article, examples=examples, enable_queue=True).launch()