unstructured
6c9990b0 - Chore: specify default language parameter to paddle with `DEFAULT_PADDLE_LANG` (#2065)

Commit
2 years ago
Chore: specify default language parameter to paddle with `DEFAULT_PADDLE_LANG` (#2065) Close: https://github.com/Unstructured-IO/unstructured-api/issues/247 ### Summary User now can specify default [paddle lang code](https://github.com/Mushroomcat9998/PaddleOCR/blob/main/doc/doc_en/multi_languages_en.md#5-support-languages-and-abbreviations) with env `DEFAULT_PADDLE_LANG` before we have the language mapping for paddle ### Test * in your unstructured API env, cd to unstructured repo and install it locally with `pip install -e .` * check out to this branch * run paddle on intel chip: ``` pip install paddlepaddle pip install "unstructured.PaddleOCR" export OCR_AGENT=paddle export DEFAULT_PADDLE_LANG=ch make run-web-app ``` * curl: ``` curl -X 'POST' 'http://localhost:8000/general/v0/general' -H 'accept: application/json' -F 'files=@sample-docs/english-and-korean.png' | jq -C . | less -R ``` * expected to see `INFO Loading paddle with CPU on language=ch...` in log info
Author
Parents
Loading