Skip to content

Commit a72c974

Browse files
author
root
committed
Fix NameError: LayoutElements not defined in paddle_ocr.py
1 parent d64c57d commit a72c974

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

unstructured/partition/utils/ocr_models/paddle_ocr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def get_layout_from_image(self, image: PILImage.Image) -> TextRegions:
8181

8282
@requires_dependencies("unstructured_inference")
8383
def get_layout_elements_from_image(self, image: PILImage.Image) -> LayoutElements:
84+
from unstructured_inference.inference.layoutelement import LayoutElements
85+
8486
ocr_regions = self.get_layout_from_image(image)
8587

8688
# NOTE(christine): For paddle, there is no difference in `ocr_layout` and `ocr_text` in

0 commit comments

Comments
 (0)