Stoneman commited on
Commit
b6c16c3
1 Parent(s): e1ddabe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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)