karpurna2 commited on
Commit
8b4cd3f
·
1 Parent(s): b700f65

updated get_caption

Browse files
Files changed (1) hide show
  1. utils/Caption.py +1 -1
utils/Caption.py CHANGED
@@ -7,7 +7,7 @@ def get_caption(image):
7
 
8
  model = AutoModel.from_pretrained('openbmb/MiniCPM-Llama3-V-2_5', trust_remote_code=True, torch_dtype=torch.float16)
9
  model = model.to(device='cuda')
10
-
11
  tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-Llama3-V-2_5', trust_remote_code=True)
12
  model.eval()
13
  question = "Describe the image."
 
7
 
8
  model = AutoModel.from_pretrained('openbmb/MiniCPM-Llama3-V-2_5', trust_remote_code=True, torch_dtype=torch.float16)
9
  model = model.to(device='cuda')
10
+ image.to(device='cuda')
11
  tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-Llama3-V-2_5', trust_remote_code=True)
12
  model.eval()
13
  question = "Describe the image."