Enable BLIP for auto VQA (#29499)
* Enable BLIP for auto VQA * Make style * Add VQA to BLIP pipeline tests
This commit is contained in:
@@ -964,6 +964,7 @@ MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING_NAMES = OrderedDict(
|
|||||||
|
|
||||||
MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES = OrderedDict(
|
MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING_NAMES = OrderedDict(
|
||||||
[
|
[
|
||||||
|
("blip", "BlipForQuestionAnswering"),
|
||||||
("blip-2", "Blip2ForConditionalGeneration"),
|
("blip-2", "Blip2ForConditionalGeneration"),
|
||||||
("vilt", "ViltForQuestionAnswering"),
|
("vilt", "ViltForQuestionAnswering"),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -432,6 +432,7 @@ class BlipModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
|
|||||||
{
|
{
|
||||||
"feature-extraction": BlipModel,
|
"feature-extraction": BlipModel,
|
||||||
"image-to-text": BlipForConditionalGeneration,
|
"image-to-text": BlipForConditionalGeneration,
|
||||||
|
"visual-question-answering": BlipForQuestionAnswering,
|
||||||
}
|
}
|
||||||
if is_torch_available()
|
if is_torch_available()
|
||||||
else {}
|
else {}
|
||||||
|
|||||||
Reference in New Issue
Block a user