Update README.md
Browse files
README.md
CHANGED
@@ -22,9 +22,10 @@ It produces optimal results in a reasonable time. Moreover, its implementation w
|
|
22 |
from transformers import ViTFeatureExtractor, AutoTokenizer, VisionEncoderDecoderModel
|
23 |
|
24 |
# Model
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
|
29 |
# Predict function
|
30 |
def predict_prompts(list_images, max_length=16):
|
|
|
22 |
from transformers import ViTFeatureExtractor, AutoTokenizer, VisionEncoderDecoderModel
|
23 |
|
24 |
# Model
|
25 |
+
model_id = "nttdataspain/vit-gpt2-coco-lora"
|
26 |
+
model = VisionEncoderDecoderModel.from_pretrained(model_id)
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
28 |
+
feature_extractor = ViTFeatureExtractor.from_pretrained(model_id)
|
29 |
|
30 |
# Predict function
|
31 |
def predict_prompts(list_images, max_length=16):
|