docs: add missing header text for VQA model
#3
by
kgoedecke
- opened
README.md
CHANGED
@@ -43,7 +43,7 @@ model = Pix2StructForConditionalGeneration.from_pretrained('google/matcha-chart2
|
|
43 |
url = "https://raw.githubusercontent.com/vis-nlp/ChartQA/main/ChartQA%20Dataset/val/png/20294671002019.png"
|
44 |
image = Image.open(requests.get(url, stream=True).raw)
|
45 |
|
46 |
-
inputs = processor(images=image, return_tensors="pt")
|
47 |
predictions = model.generate(**inputs, max_new_tokens=512)
|
48 |
print(processor.decode(predictions[0], skip_special_tokens=True))
|
49 |
```
|
|
|
43 |
url = "https://raw.githubusercontent.com/vis-nlp/ChartQA/main/ChartQA%20Dataset/val/png/20294671002019.png"
|
44 |
image = Image.open(requests.get(url, stream=True).raw)
|
45 |
|
46 |
+
inputs = processor(images=image, text="Generate underlying data table of the figure below:", return_tensors="pt")
|
47 |
predictions = model.generate(**inputs, max_new_tokens=512)
|
48 |
print(processor.decode(predictions[0], skip_special_tokens=True))
|
49 |
```
|