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

TypeError: get_model() got an unexpected keyword argument 'ocr_languages' when using strategy=hi_res #329

Open
samqi opened this issue Mar 18, 2024 · 0 comments

Comments

@samqi
Copy link

samqi commented Mar 18, 2024

System Info : python3.10
Environment Details : Google Collab

Error encountered when trying to use elements with pdf using hi_res strategy :
elements = partition_pdf("myPDFfile.pdf", strategy="hi_res")

Error output:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-58-69a6eb81afc1>](https://localhost:8080/#) in <cell line: 1>()
----> 1 elements = partition_pdf("myPDFfile.pdf", strategy="hi_res")

5 frames
[/usr/local/lib/python3.10/dist-packages/unstructured_inference/inference/layout.py](https://localhost:8080/#) in process_file_with_model(filename, model_name, is_image, fixed_layouts, pdf_image_dpi, **kwargs)
    375     model_name."""
    376 
--> 377     model = get_model(model_name, **kwargs)
    378     if isinstance(model, UnstructuredObjectDetectionModel):
    379         detection_model = model

TypeError: get_model() got an unexpected keyword argument 'ocr_languages'

what is this ocr_languages argument??? I am unable to use the table mode preservation with unstructured at all due to this Appreciate any assistance.

p/s: I have already tried loading some older versions of unstructured and unstructured_inference as mention in other gh repo issue but no difference for me.

I followed the blog post, but got stuck from there onwards despite consulting all relevant docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant