From 13aad525db5c531edfd39f9ff3920cbc2b78a8b4 Mon Sep 17 00:00:00 2001 From: Ankur Singh Date: Sun, 27 Nov 2022 08:18:13 +0000 Subject: [PATCH] Update README.md (#8) - Update README.md (4a7a084d5dce710df8ebbe4ae421e1b41c95dda8) Co-authored-by: Omkar Subhash Ghongade --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bfaedc9..b9ae64c 100644 --- a/README.md +++ b/README.md @@ -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")