jamescalam commited on
Commit
395e0e5
1 Parent(s): 7ae852e

Update unsplash-25k-photos.py

Browse files
Files changed (1) hide show
  1. unsplash-25k-photos.py +2 -0
unsplash-25k-photos.py CHANGED
@@ -82,5 +82,7 @@ class Unsplash(datasets.GeneratorBasedBuilder):
82
  id_ += 1
83
  else:
84
  values = line.strip().split("\t")
 
 
85
  yield id_, {cols[i]: values[i] for i in range(len(cols))}
86
  id_ += 1
 
82
  id_ += 1
83
  else:
84
  values = line.strip().split("\t")
85
+ if len(values) != len(cols):
86
+ values.extend(['']*(len(cols)-len(values)))
87
  yield id_, {cols[i]: values[i] for i in range(len(cols))}
88
  id_ += 1