Commit
•
74538bb
1
Parent(s):
9186685
Update README.md (#2)
Browse files- Update README.md (f6978bd8bfe714b7a749a51f87df3730e81be6d2)
Co-authored-by: Роман <BahamutRU@users.noreply.huggingface.co>
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)
|