Update app.py
Browse files
app.py
CHANGED
@@ -477,11 +477,11 @@ def inference(image, audio, video, task_type, instruction):
|
|
477 |
else:
|
478 |
return None, tokens
|
479 |
|
480 |
-
inputs = [gr.inputs.Image(type='pil'), gr.Audio(source="upload", type="filepath"), gr.Video(source="upload", type="filepath"), gr.inputs.Radio(choices=['Image Captioning', 'Video Captioning', 'Audio Captioning', "Visual Grounding", "General", "General Video"], type="value", default="Image Captioning", label="Task"), gr.inputs.Textbox(lines=1, label="Instruction")]
|
481 |
outputs = [gr.outputs.Image(type='pil'), 'text']
|
482 |
examples = [
|
483 |
['examples/images/soccer.jpg', None, None, 'Image Captioning', None],
|
484 |
-
|
485 |
['examples/images/banana.jpg', None, None, 'Visual Grounding', 'the detached banana'],
|
486 |
['examples/images/skateboard.jpg', None, None, 'General', 'which region does the text " a yellow bird " describe?'],
|
487 |
['examples/images/baseball.jpg', None, None, 'General', 'what is this sport?'],
|
|
|
477 |
else:
|
478 |
return None, tokens
|
479 |
|
480 |
+
inputs = [gr.inputs.Image(type='pil'), gr.Audio(source="upload", type="filepath"), gr.Video(source="upload", type="filepath"), gr.inputs.Radio(choices=['Image Captioning', 'Visual Question Answering', 'Video Captioning', 'Audio Captioning', "Visual Grounding", "General", "General Video"], type="value", default="Image Captioning", label="Task"), gr.inputs.Textbox(lines=1, label="Instruction")]
|
481 |
outputs = [gr.outputs.Image(type='pil'), 'text']
|
482 |
examples = [
|
483 |
['examples/images/soccer.jpg', None, None, 'Image Captioning', None],
|
484 |
+
['examples/images/woman_inblack.jpg', None, None, 'Visual Question Answering', 'what does the woman wearing black do?'],
|
485 |
['examples/images/banana.jpg', None, None, 'Visual Grounding', 'the detached banana'],
|
486 |
['examples/images/skateboard.jpg', None, None, 'General', 'which region does the text " a yellow bird " describe?'],
|
487 |
['examples/images/baseball.jpg', None, None, 'General', 'what is this sport?'],
|