unstructured
b1534af5 - Fix: replace wrong logger for paddle info (#1916)

Commit
2 years ago
Fix: replace wrong logger for paddle info (#1916) ### Summary The logger from `paddle_ocr.py` is wrong, it should be `from unstructured.logger` since the module is in unst repo ### Test * install this branch of unst to an unst-api env with `pip install -e .` * in unst-api repo, run `OCR_AGENT=paddle make run-web-app` * curl with: ``` curl -X 'POST' 'http://0.0.0.0:8000/general/v0/general' \ -H 'accept: application/json' \ -H 'Content-Type: multipart/form-data' \ -F 'files=@sample-docs/layout-parser-paper.pdf' \ -F 'strategy=hi_res' \ -F 'pdf_infer_table_structure=True' \ | jq -C . | less -R ``` you should be able to see log like ``` 2023-10-27 10:31:48,691 unstructured INFO Processing OCR with paddle... 2023-10-27 10:31:48,969 unstructured INFO Loading paddle with CPU on language=en... ``` not ``` 2023-10-27 10:16:08,654 unstructured_inference INFO Loading paddle with CPU on language=en... ``` even paddle is not installed
Author
Parents
Loading