AnonymousSub commited on
Commit
7518be4
1 Parent(s): 627fbe3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -75,13 +75,13 @@ def generate_answers(image, question):
75
 
76
  answer_blip_large = generate_answer_blip(blip_processor_large, blip_model_large, image, question)
77
 
78
- answer_vilt = generate_answer_vilt(vilt_processor, vilt_model, image, question)
79
 
80
- return answer_git_base, answer_git_large, answer_blip_base, answer_blip_large, answer_vilt
81
 
82
 
83
  examples = [["cats.jpg", "How many cats are there?"], ["stop_sign.png", "What's behind the stop sign?"], ["astronaut.jpg", "What's the astronaut riding on?"]]
84
- outputs = [gr.outputs.Textbox(label="Answer generated by GIT-base"), gr.outputs.Textbox(label="Answer generated by GIT-large"), gr.outputs.Textbox(label="Answer generated by BLIP-base"), gr.outputs.Textbox(label="Answer generated by BLIP-large"), gr.outputs.Textbox(label="Answer generated by ViLT")]
85
 
86
  title = "Interactive demo: comparing visual question answering (VQA) models"
87
  description = "Gradio Demo to compare GIT, BLIP and ViLT, 3 state-of-the-art vision+language 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."
 
75
 
76
  answer_blip_large = generate_answer_blip(blip_processor_large, blip_model_large, image, question)
77
 
78
+ # answer_vilt = generate_answer_vilt(vilt_processor, vilt_model, image, question)
79
 
80
+ return answer_git_base, answer_git_large, answer_blip_base, answer_blip_large#, answer_vilt
81
 
82
 
83
  examples = [["cats.jpg", "How many cats are there?"], ["stop_sign.png", "What's behind the stop sign?"], ["astronaut.jpg", "What's the astronaut riding on?"]]
84
+ outputs = [gr.outputs.Textbox(label="Answer generated by GIT-base"), gr.outputs.Textbox(label="Answer generated by GIT-large"), gr.outputs.Textbox(label="Answer generated by BLIP-base"), gr.outputs.Textbox(label="Answer generated by BLIP-large")]#, gr.outputs.Textbox(label="Answer generated by ViLT")]
85
 
86
  title = "Interactive demo: comparing visual question answering (VQA) models"
87
  description = "Gradio Demo to compare GIT, BLIP and ViLT, 3 state-of-the-art vision+language 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."