mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
fix: add page as argument to build_prompt
Signed-off-by: ElHachem02 <peterelhachem02@gmail.com>
This commit is contained in:
@@ -86,6 +86,7 @@ class ThreadedLayoutVlmPipeline(BasePipeline):
|
||||
class LayoutAwareVlmOptions(type(base_vlm_options)): # type: ignore[misc]
|
||||
def build_prompt(
|
||||
self,
|
||||
page: Optional[SegmentedPage],
|
||||
*,
|
||||
_internal_page: Optional[Page] = None,
|
||||
) -> str:
|
||||
@@ -120,6 +121,9 @@ class ThreadedLayoutVlmPipeline(BasePipeline):
|
||||
print("Found a table!")
|
||||
tag_name = "otsl"
|
||||
|
||||
if tag_name == "section_header_level_1":
|
||||
tag_name = "section_header"
|
||||
|
||||
# Convert bbox to tuple and get location tokens
|
||||
bbox_tuple = cluster.bbox.as_tuple()
|
||||
location_tokens = DocumentToken.get_location(
|
||||
|
||||
Reference in New Issue
Block a user