wza commited on
Commit
bb7927b
1 Parent(s): d4b5708

Update TimeTravel.py

Browse files
Files changed (1) hide show
  1. TimeTravel.py +1 -1
TimeTravel.py CHANGED
@@ -153,7 +153,7 @@ class TimeTravel(datasets.GeneratorBasedBuilder):
153
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
154
  with open(filepath, encoding="utf-8") as f:
155
  for key, row in enumerate(f):
156
- if row:
157
  data = json.loads(row)
158
  yield key, {
159
  "story_id": data["story_id"],
 
153
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
154
  with open(filepath, encoding="utf-8") as f:
155
  for key, row in enumerate(f):
156
+ if row.split():
157
  data = json.loads(row)
158
  yield key, {
159
  "story_id": data["story_id"],