nielsr HF staff commited on
Commit
37c781d
1 Parent(s): c62a436

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from transformers import AutoProcessor, AutoImageProcessor, AutoModelForCausalLM, BlipForConditionalGeneration
3
  import torch
4
 
5
  torch.hub.download_url_to_file('http://images.cocodataset.org/val2017/000000039769.jpg', 'cats.jpg')
@@ -42,7 +42,7 @@ def generate_captions(image):
42
  examples = [["cats.jpg"], ["stop_sign.png"]]
43
 
44
  title = "Interactive demo: comparing image captioning models"
45
- description = "Gradio Demo to compare GIT and BLIP, 2 state-of-the-art captioning models. To use it, simply upload your image and click 'submit', or click one of the examples to load them. Read more at the links below."
46
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2102.03334' target='_blank'>ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision</a> | <a href='https://github.com/dandelin/ViLT' target='_blank'>Github Repo</a></p>"
47
 
48
  interface = gr.Interface(fn=generate_captions,
 
1
  import gradio as gr
2
+ from transformers import AutoProcessor, AutoImageProcessor, AutoModelForCausalLM, BlipForConditionalGeneration, VisionEncoderDecoderModel
3
  import torch
4
 
5
  torch.hub.download_url_to_file('http://images.cocodataset.org/val2017/000000039769.jpg', 'cats.jpg')
 
42
  examples = [["cats.jpg"], ["stop_sign.png"]]
43
 
44
  title = "Interactive demo: comparing image captioning models"
45
+ description = "Gradio Demo to compare GIT, BLIP and ViT-2-GPT2, 3 state-of-the-art captioning models. To use it, simply upload your image and click 'submit', or click one of the examples to load them. Read more at the links below."
46
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2102.03334' target='_blank'>ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision</a> | <a href='https://github.com/dandelin/ViLT' target='_blank'>Github Repo</a></p>"
47
 
48
  interface = gr.Interface(fn=generate_captions,