Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing issue in inference_utils.py #3716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions unstructured/partition/pdf_image/inference_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ def build_layout_elements_from_ocr_regions(

grouped_regions.append(regions)
else:
grouped_regions = partition_groups_from_regions(ocr_regions)
text_regions = TextRegions.from_list(ocr_regions)
grouped_regions = partition_groups_from_regions(text_regions)

merged_regions = [merge_text_regions(group) for group in grouped_regions]
merged_regions = [merge_text_regions(group.as_list()) for group in grouped_regions]
return [
build_layout_element(
bbox=r.bbox, text=r.text, source=r.source, element_type=ElementType.UNCATEGORIZED_TEXT
Expand Down