ss900371tw commited on
Commit
d60d172
·
verified ·
1 Parent(s): 50de5d6

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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 = [e + "</Event>" for e in text_content.split("</Event>") if e.strip()]
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