Ahsen Khaliq commited on
Commit
a2a9d3d
·
1 Parent(s): f493074

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ from matplotlib import patches, lines
15
  from matplotlib.patches import Polygon
16
  import gradio as gr
17
 
18
- torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2016/05/28/08/32/elephant-1421167_1280.jpg', 'elephant.jpg')
19
 
20
  torch.set_grad_enabled(False);
21
  # standard PyTorch mean-std input image normalization
@@ -142,7 +142,7 @@ def plot_inference(im, caption):
142
  title = "MDETR"
143
  description = "Gradio demo for MDETR: Modulated Detection for End-to-End Multi-Modal Understanding. To use it, simply upload your image and add text, or click one of the examples to load them. Read more at the links below."
144
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.12763'>MDETR: Modulated Detection for End-to-End Multi-Modal Understanding</a> | <a href='https://github.com/ashkamath/mdetr'>Github Repo</a></p>"
145
- examples =[['elephant.jpg','an elephant']]
146
  gr.Interface(
147
  plot_inference,
148
  [gr.inputs.Image(type="pil", label="Input"), gr.inputs.Textbox(label="input text")],
 
15
  from matplotlib.patches import Polygon
16
  import gradio as gr
17
 
18
+ torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2014/03/04/15/10/elephants-279505_1280.jpg', 'elephant.jpg')
19
 
20
  torch.set_grad_enabled(False);
21
  # standard PyTorch mean-std input image normalization
 
142
  title = "MDETR"
143
  description = "Gradio demo for MDETR: Modulated Detection for End-to-End Multi-Modal Understanding. To use it, simply upload your image and add text, or click one of the examples to load them. Read more at the links below."
144
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.12763'>MDETR: Modulated Detection for End-to-End Multi-Modal Understanding</a> | <a href='https://github.com/ashkamath/mdetr'>Github Repo</a></p>"
145
+ examples =[['elephant.jpg','baby elephant']]
146
  gr.Interface(
147
  plot_inference,
148
  [gr.inputs.Image(type="pil", label="Input"), gr.inputs.Textbox(label="input text")],