Matías Rojas commited on
Commit
3ca46c1
1 Parent(s): fe7c3ef

dataset simplified

Browse files
Files changed (2) hide show
  1. data.csv +0 -0
  2. task1a.py +2 -2
data.csv CHANGED
The diff for this file is too large to render. See raw diff
 
task1a.py CHANGED
@@ -10,7 +10,6 @@ class Task1a(datasets.GeneratorBasedBuilder):
10
  return datasets.DatasetInfo(
11
  features=datasets.Features(
12
  {
13
- "filename": datasets.Value("string"),
14
  "text": datasets.Value("string"),
15
  "label": datasets.ClassLabel(names = ["0", "1"]),
16
  }
@@ -34,7 +33,8 @@ class Task1a(datasets.GeneratorBasedBuilder):
34
  # next(csv_reader, None) # skip the headers
35
  for id_, row in enumerate(csv_reader):
36
  if id_ > 0:
37
- filename, text, label = row
 
38
  current_row = id_, {"text": text, "label": int(label)}
39
  if (id_ < train_threshold) & (not is_test):
40
  yield current_row
 
10
  return datasets.DatasetInfo(
11
  features=datasets.Features(
12
  {
 
13
  "text": datasets.Value("string"),
14
  "label": datasets.ClassLabel(names = ["0", "1"]),
15
  }
 
33
  # next(csv_reader, None) # skip the headers
34
  for id_, row in enumerate(csv_reader):
35
  if id_ > 0:
36
+ print(row)
37
+ text, label = row
38
  current_row = id_, {"text": text, "label": int(label)}
39
  if (id_ < train_threshold) & (not is_test):
40
  yield current_row