fix image2test args forwarding (#19648)

* fix image2test args forwarding

* fix issues

* Proposing the update to the PR.

* Fixup.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
This commit is contained in:
Rak Alexey
2022-10-24 16:49:24 +03:00
committed by GitHub
parent 3b419cfc6f
commit d3f4cef74d
2 changed files with 30 additions and 4 deletions

View File

@@ -86,6 +86,12 @@ class ImageToTextPipelineTests(unittest.TestCase, metaclass=PipelineTestCaseMeta
],
)
outputs = pipe(image, max_new_tokens=1)
self.assertEqual(
outputs,
[{"generated_text": "growth"}],
)
@require_torch
def test_small_model_pt(self):
pipe = pipeline("image-to-text", model="hf-internal-testing/tiny-random-vit-gpt2")