Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
•
0f39a35
1
Parent(s):
daf68a9
bugfix: 修复 xlsx 文件建立索引时出错的问题
Browse files- modules/index_func.py +1 -0
modules/index_func.py
CHANGED
@@ -70,6 +70,7 @@ def get_documents(file_src):
|
|
70 |
elif file_type == ".xlsx":
|
71 |
logging.debug("Loading Excel...")
|
72 |
text_list = excel_to_string(filepath)
|
|
|
73 |
for elem in text_list:
|
74 |
texts.append(Document(page_content=elem, metadata={"source": filepath}))
|
75 |
else:
|
|
|
70 |
elif file_type == ".xlsx":
|
71 |
logging.debug("Loading Excel...")
|
72 |
text_list = excel_to_string(filepath)
|
73 |
+
texts = []
|
74 |
for elem in text_list:
|
75 |
texts.append(Document(page_content=elem, metadata={"source": filepath}))
|
76 |
else:
|