mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-14 22:43:49 +00:00
style:fmt
This commit is contained in:
parent
e7dcbe3dab
commit
795be61d4a
@ -22,5 +22,7 @@ class DocxLoader(BaseLoader):
|
|||||||
para = doc.paragraphs[i]
|
para = doc.paragraphs[i]
|
||||||
text = para.text
|
text = para.text
|
||||||
content.append(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
|
return docs
|
||||||
|
@ -20,5 +20,9 @@ class PPTLoader(BaseLoader):
|
|||||||
for slide in pr.slides:
|
for slide in pr.slides:
|
||||||
for shape in slide.shapes:
|
for shape in slide.shapes:
|
||||||
if hasattr(shape, "text") and shape.text is not "":
|
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
|
return docs
|
||||||
|
Loading…
Reference in New Issue
Block a user