Spaces:
Runtime error
Runtime error
Update preprocess.py
Browse files- preprocess.py +4 -1
preprocess.py
CHANGED
@@ -5,7 +5,10 @@ from langchain_community.document_loaders import UnstructuredAPIFileLoader
|
|
5 |
|
6 |
def load_documents_OCR(file_path, unstructured_api):
|
7 |
"""Load documents that require OCR via unstructured."""
|
8 |
-
loader = UnstructuredAPIFileLoader(file_path=file_path,
|
|
|
|
|
|
|
9 |
documents = loader.load()
|
10 |
return documents
|
11 |
|
|
|
5 |
|
6 |
def load_documents_OCR(file_path, unstructured_api):
|
7 |
"""Load documents that require OCR via unstructured."""
|
8 |
+
loader = UnstructuredAPIFileLoader(file_path=file_path,
|
9 |
+
api_key=unstructured_api,
|
10 |
+
url='https://paf-stkjy1b5.api.unstructuredapp.io/',
|
11 |
+
mode='paged')
|
12 |
documents = loader.load()
|
13 |
return documents
|
14 |
|