Spaces:
Build error
Build error
Add description
Browse files
app.py
CHANGED
@@ -102,7 +102,16 @@ def predict(img, text):
|
|
102 |
|
103 |
return prediction_vqa, prediction_aux
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
gr.Interface(fn=predict,
|
|
|
106 |
inputs=[gr.Image(label='Image'), gr.Textbox(label='Question')],
|
107 |
outputs=[gr.outputs.Label(label='Answer', num_top_classes=5), gr.outputs.Label(label='Answer Category', num_top_classes=7)],
|
108 |
examples=[['examples/Augustiner.jpg', 'What is this?'],['examples/VizWiz_test_00006968.jpg', 'Can you tell me the color of the dog?'], ['examples/VizWiz_test_00005604.jpg', 'What drink is this?'], ['examples/VizWiz_test_00006246.jpg', 'Can you please tell me what kind of tea this is?'], ['examples/VizWiz_train_00004056.jpg', 'Is that a beer or a coke?'], ['examples/VizWiz_train_00017146.jpg', 'Can you tell me what\'s on this envelope please?'], ['examples/VizWiz_val_00003077.jpg', 'What is this?']]
|
|
|
102 |
|
103 |
return prediction_vqa, prediction_aux
|
104 |
|
105 |
+
description = """
|
106 |
+
Less Is More: Linear Layers on CLIP Features as Powerful VizWiz Model
|
107 |
+
|
108 |
+
Our approach focuses on visual question answering for visual impaired people. We fine-tuned our approach on the <a href='https://vizwiz.org/tasks-and-datasets/vqa/' >CVPR Grand Challenge VizWiz 2022</a> data set.
|
109 |
+
|
110 |
+
You may click on of the examples or upload your own image and question. The Gradio app shows the current answer for your question and an answer category.
|
111 |
+
"""
|
112 |
+
|
113 |
gr.Interface(fn=predict,
|
114 |
+
description=description,
|
115 |
inputs=[gr.Image(label='Image'), gr.Textbox(label='Question')],
|
116 |
outputs=[gr.outputs.Label(label='Answer', num_top_classes=5), gr.outputs.Label(label='Answer Category', num_top_classes=7)],
|
117 |
examples=[['examples/Augustiner.jpg', 'What is this?'],['examples/VizWiz_test_00006968.jpg', 'Can you tell me the color of the dog?'], ['examples/VizWiz_test_00005604.jpg', 'What drink is this?'], ['examples/VizWiz_test_00006246.jpg', 'Can you please tell me what kind of tea this is?'], ['examples/VizWiz_train_00004056.jpg', 'Is that a beer or a coke?'], ['examples/VizWiz_train_00017146.jpg', 'Can you tell me what\'s on this envelope please?'], ['examples/VizWiz_val_00003077.jpg', 'What is this?']]
|
dataloader/__pycache__/extract_features_dataloader.cpython-39.pyc
DELETED
Binary file (5.13 kB)
|
|
model/__pycache__/vqa_model.cpython-39.pyc
DELETED
Binary file (2.84 kB)
|
|