Add Image To Text Generation pipeline (#18821)

* Add Image2TextGenerationPipeline to supported pipelines

* Add Flax and Tensorflow support

* Add Flax and Tensorflow small tests

* Add default model for Tensorflow

* Add docstring

* Fix doc style

* Add tiny models for pytorch and flax

* Remove flax from pipeline.
Fix tests

* Use ydshieh/vit-gpt2-coco-en as a default for both PyTorch and Tensorflow

* Fix Tensorflow support

Co-authored-by: Olivier Dehaene <olivier@huggingface.co>
This commit is contained in:
OlivierDehaene
2022-09-01 18:07:14 +02:00
committed by GitHub
parent c61f116b63
commit ddb69e5af8
5 changed files with 292 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ There are two categories of pipeline abstractions to be aware about:
- [`FillMaskPipeline`]
- [`ImageClassificationPipeline`]
- [`ImageSegmentationPipeline`]
- [`Image2TextGenerationPipeline`]
- [`ObjectDetectionPipeline`]
- [`QuestionAnsweringPipeline`]
- [`SummarizationPipeline`]
@@ -365,6 +366,12 @@ That should enable you to do all the custom code you want.
- __call__
- all
### Image2TextGenerationPipeline
[[autodoc]] Image2TextGenerationPipeline
- __call__
- all
### NerPipeline
[[autodoc]] NerPipeline