mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
Use yield from correctly?
Signed-off-by: Vinay Damodaran <vrdn@hey.com>
This commit is contained in:
parent
e82bcaae61
commit
45c5a9445a
@ -70,5 +70,4 @@ class ApiVlmModel(BasePageModel):
|
||||
return page
|
||||
|
||||
with ThreadPoolExecutor(max_workers=concurrency) as executor:
|
||||
for result in executor.map(_vlm_request, page_batch):
|
||||
yield from result
|
||||
yield from executor.map(_vlm_request, page_batch)
|
||||
|
@ -62,5 +62,4 @@ class PictureDescriptionApiModel(PictureDescriptionBaseModel):
|
||||
)
|
||||
|
||||
with ThreadPoolExecutor(max_workers=concurrency) as executor:
|
||||
for result in executor.map(_api_request, images):
|
||||
yield from result
|
||||
yield from executor.map(_api_request, images)
|
||||
|
Loading…
Reference in New Issue
Block a user