Skip to content

Commit

Permalink
fix code example in mgp-str doc (huggingface#22219)
Browse files Browse the repository at this point in the history
Co-authored-by: yue kun <[email protected]>
  • Loading branch information
wdp-007 and yue kun authored Mar 17, 2023
1 parent 33d033d commit af1c864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/en/model_doc/mgp-str.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ into a single instance to both extract the input features and decode the predict
>>> url = "https://i.postimg.cc/ZKwLg2Gw/367-14.png"
>>> image = Image.open(requests.get(url, stream=True).raw).convert("RGB")

>>> pixel_values = processor(image, return_tensors="pt").pixel_values
>>> pixel_values = processor(images=image, return_tensors="pt").pixel_values
>>> outputs = model(pixel_values)

>>> generated_text = processor.batch_decode(outputs.logits)['generated_text']
Expand Down

0 comments on commit af1c864

Please sign in to comment.