Jyothirmai commited on
Commit
2f1cbf2
1 Parent(s): 5d4c633

Update clipGPT.py

Browse files
Files changed (1) hide show
  1. clipGPT.py +1 -1
clipGPT.py CHANGED
@@ -148,7 +148,7 @@ def generate_caption_clipgpt(img):
148
 
149
  prefix_length = 10
150
  model = ClipGPT2Model(prefix_length, img_feature_size = 512)
151
- model.load_state_dict(torch.load('model_train_best_run_clipGPT.pt'))
152
  model = model.eval()
153
  device=torch.device('cpu')
154
  model = model.to(device)
 
148
 
149
  prefix_length = 10
150
  model = ClipGPT2Model(prefix_length, img_feature_size = 512)
151
+ model.load_state_dict(torch.load('model_train_best_run_clipGPT.pt', map_location=torch.device('cpu')))
152
  model = model.eval()
153
  device=torch.device('cpu')
154
  model = model.to(device)