Skip to content

Commit 2d249e9

Browse files
committed
Fix api_image_request usage
Signed-off-by: Christoph Auer <[email protected]>
1 parent a0d3f10 commit 2d249e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/examples/post_process_ocr_with_vlm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,15 @@ def is_processable(self, doc: DoclingDocument, element: NodeItem) -> bool:
278278

279279
def _annotate_images(self, images: Iterable[Image.Image]) -> Iterable[str]:
280280
def _api_request(image: Image.Image) -> str:
281-
return api_image_request(
281+
res = api_image_request(
282282
image=image,
283283
prompt=self.options.prompt,
284284
url=self.options.url,
285285
timeout=self.options.timeout,
286286
headers=self.options.headers,
287287
**self.options.params,
288288
)
289+
return res[0]
289290

290291
with ThreadPoolExecutor(max_workers=self.concurrency) as executor:
291292
yield from executor.map(_api_request, images)

0 commit comments

Comments
 (0)