rain1024 commited on
Commit
cec99f6
·
1 Parent(s): 1fed1dd
Files changed (1) hide show
  1. UTS_Text.py +6 -5
UTS_Text.py CHANGED
@@ -77,9 +77,10 @@ class UTSText(datasets.GeneratorBasedBuilder):
77
  with open(filepath, encoding="utf-8") as f:
78
  for line in f:
79
  print(line)
80
- item = {
81
- "text": line
82
- }
83
- yield guid, item
84
- guid += 1
 
85
 
 
77
  with open(filepath, encoding="utf-8") as f:
78
  for line in f:
79
  print(line)
80
+ if line.strip() != "":
81
+ item = {
82
+ "text": line
83
+ }
84
+ yield guid, item
85
+ guid += 1
86