From af1c864cdc21176a529f0aefceb99e9609a06be5 Mon Sep 17 00:00:00 2001 From: wangpeng <1204591829@qq.com> Date: Fri, 17 Mar 2023 17:40:06 +0800 Subject: [PATCH] fix code example in mgp-str doc (#22219) Co-authored-by: yue kun --- docs/source/en/model_doc/mgp-str.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/en/model_doc/mgp-str.mdx b/docs/source/en/model_doc/mgp-str.mdx index fc3d9f4152..77c937bfb2 100644 --- a/docs/source/en/model_doc/mgp-str.mdx +++ b/docs/source/en/model_doc/mgp-str.mdx @@ -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']