Open
Description
Hello unstructured team,
I ran into a bug where the module: unstructured/partition/utils/ocr_models/paddle_ocr.py
Would return the bug described above.
Here was my fix:
in the document where I call partition_pdf()
I set the namespace like so:
import unstructured.partition.utils.ocr_models.paddle_ocr as paddle_ocr_modue
from unstructure_inference.inference.layoutelement import LayoutElements
paddle_ocr_module.LayoutElements = LayoutElements
I am not sure if this is a sustainable solution, and I am not sure why the module itself is not able to find the definition of LayoutElements itself without me manually setting the namespace.
I made sure to have TYPING dependency, and at some point I even removed the condition, neither of which worked.
Please let me know if I missed something during installation that is causing this.
Thanks!