BahamutRU commited on
Commit
f6978bd
1 Parent(s): 9186685

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -50,7 +50,7 @@ processor = AutoProcessor.from_pretrained(
50
  torch.cuda.empty_cache()
51
 
52
  image = Image.open("test.png")
53
- inputs = processor.process(images=img, text="Caption this image.")
54
  inputs = {k: v.to("cuda:0").unsqueeze(0) for k,v in inputs.items()}
55
  prompt_tokens = inputs["input_ids"].size(1)
56
  print("Prompt tokens:", prompt_tokens)
 
50
  torch.cuda.empty_cache()
51
 
52
  image = Image.open("test.png")
53
+ inputs = processor.process(images=image, text="Caption this image.")
54
  inputs = {k: v.to("cuda:0").unsqueeze(0) for k,v in inputs.items()}
55
  prompt_tokens = inputs["input_ids"].size(1)
56
  print("Prompt tokens:", prompt_tokens)