Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,8 @@ import torch
|
|
| 3 |
from transformers import GPT2TokenizerFast, ViTImageProcessor, VisionEncoderDecoderModel
|
| 4 |
|
| 5 |
# Setup device, model, tokenizer, and feature extractor
|
|
|
|
|
|
|
| 6 |
model_checkpoint1 = "Stoneman/IG-caption-generator-vit-gpt2-last-block"
|
| 7 |
feature_extractor1 = ViTImageProcessor.from_pretrained(model_checkpoint1)
|
| 8 |
tokenizer1 = GPT2TokenizerFast.from_pretrained(model_checkpoint1)
|
|
|
|
| 3 |
from transformers import GPT2TokenizerFast, ViTImageProcessor, VisionEncoderDecoderModel
|
| 4 |
|
| 5 |
# Setup device, model, tokenizer, and feature extractor
|
| 6 |
+
device ='cpu'
|
| 7 |
+
|
| 8 |
model_checkpoint1 = "Stoneman/IG-caption-generator-vit-gpt2-last-block"
|
| 9 |
feature_extractor1 = ViTImageProcessor.from_pretrained(model_checkpoint1)
|
| 10 |
tokenizer1 = GPT2TokenizerFast.from_pretrained(model_checkpoint1)
|