ishaandtotoro commited on
Commit
20a73b6
·
verified ·
1 Parent(s): 9289a84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -34,13 +34,15 @@ def preprocess_text(text):
34
 
35
  # Write your for-in loop below to clean each chunk and add it to the cleaned_chunks list
36
  for chunk in chunks:
37
- cleaned_chunks.append(chunk)
 
 
38
 
39
- # Print cleaned_chunks
40
- print(cleaned_chunks)
41
 
42
- # Print the length of cleaned_chunks
43
- print(len(cleaned_chunks))
44
 
45
  # Return the cleaned_chunks
46
  return cleaned_chunks
 
34
 
35
  # Write your for-in loop below to clean each chunk and add it to the cleaned_chunks list
36
  for chunk in chunks:
37
+ stripped_chunk = chunk.strip()
38
+ if len(stripped_chunk > 0):
39
+ cleaned_chunks.append(stripped_chunk)
40
 
41
+ # # Print cleaned_chunks
42
+ # print(cleaned_chunks)
43
 
44
+ # # Print the length of cleaned_chunks
45
+ # print(len(cleaned_chunks))
46
 
47
  # Return the cleaned_chunks
48
  return cleaned_chunks