mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-13 11:12:23 +03:00
Adds pytesseract, tesseract and poopler-utils (#1648)
To enable the ingestion of copy protected PDF via OCR instead of text extraction # Description Copy protected PDF can't be properly imported via the standard langchain loader. See the following errors: ``` 2023-11-15 14:16:31,927 [INFO] models.files: Computing documents from file Cradle to Cradle Criteria for the built environmen.pdf [nltk_data] Downloading package punkt to [nltk_data] /home/pascal_gula_luccid_ai/nltk_data... [nltk_data] Unzipping tokenizers/punkt.zip. [nltk_data] Downloading package averaged_perceptron_tagger to [nltk_data] /home/pascal_gula_luccid_ai/nltk_data... [nltk_data] Unzipping taggers/averaged_perceptron_tagger.zip. Error processing file: detectron2 is not installed, pytesseract is not installed and the text of the PDF is not extractable. To process this file, install detectron2, install pytesseract, or remove copy protection from the PDF. ``` ``` 2023-11-15 15:04:14,624 [INFO] models.files: Computing documents from file Cradle to Cradle Criteria for the built environmen.pdf Error processing file: Unable to get page count. Is poppler installed and in PATH? ``` ``` 023-11-15 15:59:11,886 [INFO] models.files: Computing documents from file Cradle to Cradle Criteria for the built environmen.pdf Error processing file: tesseract is not installed or it's not in your PATH. See README file for more information. ``` ## Checklist before requesting a review Please delete options that are not relevant. - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented hard-to-understand areas - [x] I have ideally added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged ## Screenshots (if appropriate): None Co-authored-by: Stan Girard <girard.stanislas@gmail.com>
This commit is contained in:
parent
111d7fba1e
commit
8bbe6e7054
@ -13,6 +13,8 @@ RUN apt-get clean && apt-get update && apt-get install -y \
|
||||
pandoc \
|
||||
curl \
|
||||
git \
|
||||
poppler-utils \
|
||||
tesseract-ocr \
|
||||
build-essential && \
|
||||
rm -rf /var/lib/apt/lists/* && apt-get clean
|
||||
|
||||
|
@ -35,4 +35,4 @@ celery[sqs]
|
||||
python-dotenv
|
||||
pytest-mock
|
||||
pytest-celery
|
||||
|
||||
pytesseract==0.3.10
|
||||
|
Loading…
Reference in New Issue
Block a user