Update README.md

#8
by itsog - opened
Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -29,6 +29,8 @@ This is an image captioning model trained by @ydshieh in [flax ](https://github.
29
  ```python
30
 
31
  from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, AutoTokenizer
 
 
32
 
33
  model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
34
  feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
 
29
  ```python
30
 
31
  from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, AutoTokenizer
32
+ import torch
33
+ from PIL import Image
34
 
35
  model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
36
  feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")