update loaders

This commit is contained in:
imClumsyPanda 2023-05-13 12:36:48 +08:00
parent 621a0fe686
commit 80854c4bcd
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class UnstructuredPaddleImageLoader(UnstructuredFileLoader):
if __name__ == "__main__": if __name__ == "__main__":
filepath = "../content/samples/test.jpg" filepath = os.path.join(os.path.dirname(os.path.dirname(__file__)), "content", "samples", "test.jpg")
loader = UnstructuredPaddleImageLoader(filepath, mode="elements") loader = UnstructuredPaddleImageLoader(filepath, mode="elements")
docs = loader.load() docs = loader.load()
for doc in docs: for doc in docs:

View File

@ -46,7 +46,7 @@ class UnstructuredPaddlePDFLoader(UnstructuredFileLoader):
if __name__ == "__main__": if __name__ == "__main__":
filepath = "../content/samples/test.pdf" filepath = os.path.join(os.path.dirname(os.path.dirname(__file__)), "content", "samples", "test.pdf")
loader = UnstructuredPaddlePDFLoader(filepath, mode="elements") loader = UnstructuredPaddlePDFLoader(filepath, mode="elements")
docs = loader.load() docs = loader.load()
for doc in docs: for doc in docs: