Resolve conflicts (#208)

This commit is contained in:
Deshraj Yadav
2023-07-10 21:50:05 -07:00
committed by GitHub
parent 6936d6983d
commit 9ca836520f
32 changed files with 396 additions and 207 deletions

View File

@@ -4,9 +4,8 @@ from embedchain.utils import clean_string
class PdfFileLoader:
def load_data(self, url):
''' Load data from a PDF file. '''
"""Load data from a PDF file."""
loader = PyPDFLoader(url)
output = []
pages = loader.load_and_split()
@@ -17,8 +16,10 @@ class PdfFileLoader:
content = clean_string(content)
meta_data = page.metadata
meta_data["url"] = url
output.append({
"content": content,
"meta_data": meta_data,
})
output.append(
{
"content": content,
"meta_data": meta_data,
}
)
return output