demoPOC commited on
Commit
841f8de
·
1 Parent(s): 48daed2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -144,8 +144,10 @@ def PDFChunkerWithSeparator(filepath, separator):
144
  content += page.extract_text()
145
  elif filepath.endswith(".txt"):
146
  with open(filepath) as f:
147
- content = f.readlines()
148
  f.close()
 
 
149
  splitted_content_list = content.split(separator)
150
 
151
  doclist = []
 
144
  content += page.extract_text()
145
  elif filepath.endswith(".txt"):
146
  with open(filepath) as f:
147
+ lines = f.readlines()
148
  f.close()
149
+ for line in lines:
150
+ content+=line
151
  splitted_content_list = content.split(separator)
152
 
153
  doclist = []