Spaces:
Build error
Build error
JunnanLi
commited on
Commit
•
e5c926d
1
Parent(s):
ea0a44f
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def inference(raw_image, model_n, question, strategy):
|
|
61 |
answer = model_vq(image_vq, question, train=False, inference='generate')
|
62 |
return 'answer: '+answer[0]
|
63 |
|
64 |
-
inputs = [gr.inputs.Image(type='pil'),gr.inputs.Radio(choices=['Image Captioning',"Visual Question Answering"], type="value", default="Image Captioning", label="Task"),"
|
65 |
outputs = gr.outputs.Textbox(label="Output")
|
66 |
|
67 |
title = "BLIP"
|
|
|
61 |
answer = model_vq(image_vq, question, train=False, inference='generate')
|
62 |
return 'answer: '+answer[0]
|
63 |
|
64 |
+
inputs = [gr.inputs.Image(type='pil'),gr.inputs.Radio(choices=['Image Captioning',"Visual Question Answering"], type="value", default="Image Captioning", label="Task"),gradio.inputs.Textbox(lines=2, label="Question"),gr.inputs.Radio(choices=['Beam search','Nucleus sampling'], type="value", default="Nucleus sampling", label="Caption Decoding Strategy")]
|
65 |
outputs = gr.outputs.Textbox(label="Output")
|
66 |
|
67 |
title = "BLIP"
|