Ahsen Khaliq commited on
Commit
497e471
·
1 Parent(s): 7d39495

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -12,6 +12,8 @@ from matplotlib import patches, lines
12
  from matplotlib.patches import Polygon
13
  import gradio as gr
14
 
 
 
15
  torch.set_grad_enabled(False);
16
  # standard PyTorch mean-std input image normalization
17
  transform = T.Compose([
@@ -134,10 +136,10 @@ def plot_inference(im, caption):
134
 
135
 
136
 
137
- title = "Anime2Sketch"
138
- description = "demo for Anime2Sketch. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
139
- article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"
140
-
141
  gr.Interface(
142
  plot_inference,
143
  [gr.inputs.Image(type="pil", label="Input"), gr.inputs.Textbox(label="input text")],
@@ -145,4 +147,5 @@ gr.Interface(
145
  title=title,
146
  description=description,
147
  article=article,
 
148
  ).launch(debug=True)
 
12
  from matplotlib.patches import Polygon
13
  import gradio as gr
14
 
15
+ torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2016/05/28/08/32/elephant-1421167_1280.jpg', 'elephant.jpg')
16
+
17
  torch.set_grad_enabled(False);
18
  # standard PyTorch mean-std input image normalization
19
  transform = T.Compose([
 
136
 
137
 
138
 
139
+ title = "MDETR"
140
+ 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."
141
+ 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>"
142
+ examples =['elephant.jpg','an elephant']
143
  gr.Interface(
144
  plot_inference,
145
  [gr.inputs.Image(type="pil", label="Input"), gr.inputs.Textbox(label="input text")],
 
147
  title=title,
148
  description=description,
149
  article=article,
150
+ examples=examples
151
  ).launch(debug=True)