Hugo Abonizio commited on
Commit
2b6eb58
1 Parent(s): ee9b21d

Fix new CSV format

Browse files
Files changed (1) hide show
  1. sst2_pt.py +2 -2
sst2_pt.py CHANGED
@@ -59,6 +59,6 @@ class SST2(datasets.GeneratorBasedBuilder):
59
  csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
60
  )
61
  next(csv_reader) # Skip header (first line)
62
- for row in csv_reader:
63
- idx, text, label = row
64
  yield idx, {"text": text, "label": label}
 
59
  csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
60
  )
61
  next(csv_reader) # Skip header (first line)
62
+ for (idx, row) in enumerate(csv_reader):
63
+ text, label = row
64
  yield idx, {"text": text, "label": label}