Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,9 @@ from transformers import AutoTokenizer, ViTFeatureExtractor, VisionEncoderDecode
|
|
5 |
|
6 |
device='cpu'
|
7 |
encoder_checkpoint = "Thibalte/captionning_project"
|
8 |
-
decoder_checkpoint = "Thibalte/captionning_project"
|
9 |
-
model_checkpoint = "Thibalte/captionning_project"
|
10 |
feature_extractor = ViTFeatureExtractor.from_pretrained(encoder_checkpoint)
|
11 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
12 |
-
model =
|
13 |
|
14 |
|
15 |
def predict(image,max_length=24, num_beams=4):
|
|
|
5 |
|
6 |
device='cpu'
|
7 |
encoder_checkpoint = "Thibalte/captionning_project"
|
|
|
|
|
8 |
feature_extractor = ViTFeatureExtractor.from_pretrained(encoder_checkpoint)
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained("Thibalte/captionning_project")
|
10 |
+
model = AutoModel.from_pretrained("Thibalte/captionning_project")
|
11 |
|
12 |
|
13 |
def predict(image,max_length=24, num_beams=4):
|