Skip to content

Commit

Permalink
Merge pull request open-webui#1050 from jannikstdl/rag-pdf-ocr
Browse files Browse the repository at this point in the history
feat: added ocr functionality to the pdf loader
  • Loading branch information
tjbck authored Mar 6, 2024
2 parents 2111398 + 089a63e commit 8fb5f54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/apps/rag/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
]

if file_ext == "pdf":
loader = PyPDFLoader(file_path)
loader = PyPDFLoader(file_path, extract_images=True)
elif file_ext == "csv":
loader = CSVLoader(file_path)
elif file_ext == "rst":
Expand Down
1 change: 1 addition & 0 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pandas
openpyxl
pyxlsb
xlrd
rapidocr-onnxruntime

faster-whisper

Expand Down

0 comments on commit 8fb5f54

Please sign in to comment.