Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def create_caption_transformer(img):
|
|
18 |
return caption_text
|
19 |
|
20 |
|
21 |
-
model = VisionEncoderDecoderModel.from_pretrained(os.getcwd()
|
22 |
feature_extractor = AutoFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
|
23 |
tokenizer = AutoTokenizer.from_pretrained('gpt2')
|
24 |
iface = gr.Interface(fn=create_caption_transformer,
|
|
|
18 |
return caption_text
|
19 |
|
20 |
|
21 |
+
model = VisionEncoderDecoderModel.from_pretrained(os.getcwd()).to('cpu')
|
22 |
feature_extractor = AutoFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
|
23 |
tokenizer = AutoTokenizer.from_pretrained('gpt2')
|
24 |
iface = gr.Interface(fn=create_caption_transformer,
|