Update README.md (#8)

- Update README.md (4a7a084d5dce710df8ebbe4ae421e1b41c95dda8)


Co-authored-by: Omkar Subhash Ghongade <itsog@users.noreply.huggingface.co>
This commit is contained in:
Ankur Singh 2022-11-27 08:18:13 +00:00 committed by system
parent 22a1024d23
commit 13aad525db
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ This is an image captioning model trained by @ydshieh in [flax ](https://github.
```python
from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, AutoTokenizer
import torch
from PIL import Image
model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")