Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +1 -3
src/streamlit_app.py
CHANGED
|
@@ -198,9 +198,7 @@ def process_file_to_faiss(uploaded_file):
|
|
| 198 |
return None, "File is empty"
|
| 199 |
|
| 200 |
# 嘗試以 </Event> 分割 Log,否則以換行符分割
|
| 201 |
-
events = [
|
| 202 |
-
if len(events) <= 1:
|
| 203 |
-
events = [line for line in text_content.split("\n") if line.strip()]
|
| 204 |
|
| 205 |
docs = [Document(page_content=e) for e in events]
|
| 206 |
|
|
|
|
| 198 |
return None, "File is empty"
|
| 199 |
|
| 200 |
# 嘗試以 </Event> 分割 Log,否則以換行符分割
|
| 201 |
+
events = [line for line in text_content.splitlines() if line.strip()]
|
|
|
|
|
|
|
| 202 |
|
| 203 |
docs = [Document(page_content=e) for e in events]
|
| 204 |
|