TheKOG commited on
Commit
11e82ae
·
1 Parent(s): 4b1eccf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -5
README.md CHANGED
@@ -1,16 +1,19 @@
1
  ---
2
- pipeline_tag: image-to-text
3
  license: apache-2.0
 
 
 
 
4
  ---
5
- ## Usage method:
6
  ```python
7
  from transformers import VisionEncoderDecoderModel, ViTImageProcessor, AutoTokenizer
8
  import torch
9
  from PIL import Image
10
 
11
- model = VisionEncoderDecoderModel.from_pretrained("AIris-Channel/vit-gpt2-verifycode-caption")
12
- feature_extractor = ViTImageProcessor.from_pretrained("AIris-Channel/vit-gpt2-verifycode-caption")
13
- tokenizer = AutoTokenizer.from_pretrained("AIris-Channel/vit-gpt2-verifycode-caption")
14
 
15
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
16
  model.to(device)
 
1
  ---
 
2
  license: apache-2.0
3
+ pipeline_tag: image-to-text
4
+ tags:
5
+ - image-captioning
6
+ - image-to-text
7
  ---
8
+ ## Use in Transformers
9
  ```python
10
  from transformers import VisionEncoderDecoderModel, ViTImageProcessor, AutoTokenizer
11
  import torch
12
  from PIL import Image
13
 
14
+ model = VisionEncoderDecoderModel.from_pretrained("TheKOG/vit-gpt2-verifycode-caption")
15
+ feature_extractor = ViTImageProcessor.from_pretrained("TheKOG/vit-gpt2-verifycode-caption")
16
+ tokenizer = AutoTokenizer.from_pretrained("TheKOG/vit-gpt2-verifycode-caption")
17
 
18
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
19
  model.to(device)