Update README.md
#2
by
BahamutRU
- opened
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=
|
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)
|