satpalsr commited on
Commit
5ab665d
1 Parent(s): 86edf25

Update indicCorpv2.py

Browse files
Files changed (1) hide show
  1. indicCorpv2.py +3 -1
indicCorpv2.py CHANGED
@@ -188,4 +188,6 @@ class IndicCorpv2(datasets.GeneratorBasedBuilder):
188
  """Yields examples."""
189
  with open(filepath, encoding="utf-8") as f:
190
  for idx, row in enumerate(f):
191
- yield idx, {"text": row.strip()}
 
 
 
188
  """Yields examples."""
189
  with open(filepath, encoding="utf-8") as f:
190
  for idx, row in enumerate(f):
191
+ stripped_row = row.strip()
192
+ if stripped_row:
193
+ yield idx, {"text": stripped_row}