Fix some pipeline tests (#21401)

* fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2023-02-02 19:03:31 +01:00
committed by GitHub
parent 145bf41c13
commit a6d8a149a8
20 changed files with 69 additions and 37 deletions

View File

@@ -50,7 +50,7 @@ class ImageClassificationPipelineTests(unittest.TestCase, metaclass=PipelineTest
tf_model_mapping = TF_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING
def get_test_pipeline(self, model, tokenizer, processor):
image_classifier = ImageClassificationPipeline(model=model, feature_extractor=processor, top_k=2)
image_classifier = ImageClassificationPipeline(model=model, image_processor=processor, top_k=2)
examples = [
Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"),
"http://images.cocodataset.org/val2017/000000039769.jpg",