mirror of
https://github.com/csunny/DB-GPT.git
synced 2026-01-25 14:54:26 +00:00
style:fmt
This commit is contained in:
@@ -22,5 +22,7 @@ class DocxLoader(BaseLoader):
|
||||
para = doc.paragraphs[i]
|
||||
text = para.text
|
||||
content.append(text)
|
||||
docs.append(Document(page_content=''.join(content), metadata={"source": self.file_path}))
|
||||
docs.append(
|
||||
Document(page_content="".join(content), metadata={"source": self.file_path})
|
||||
)
|
||||
return docs
|
||||
|
||||
@@ -20,5 +20,9 @@ class PPTLoader(BaseLoader):
|
||||
for slide in pr.slides:
|
||||
for shape in slide.shapes:
|
||||
if hasattr(shape, "text") and shape.text is not "":
|
||||
docs.append(Document(page_content=shape.text, metadata={"source": slide.slide_id}))
|
||||
docs.append(
|
||||
Document(
|
||||
page_content=shape.text, metadata={"source": slide.slide_id}
|
||||
)
|
||||
)
|
||||
return docs
|
||||
|
||||
Reference in New Issue
Block a user