mmarimon commited on
Commit
ce26ce2
·
1 Parent(s): 13a1013

Update paws-ca.py

Browse files
Files changed (1) hide show
  1. paws-ca.py +6 -6
paws-ca.py CHANGED
@@ -85,13 +85,13 @@ class PAWSX(datasets.GeneratorBasedBuilder):
85
 
86
  def _generate_examples(self, filepath):
87
  with open(filepath, encoding='utf-8') as f:
88
- for i, line in enumerate(f):
89
- data = json.loads(line)
90
  yield i, {
91
- 'id': data['id'],
92
- 'sentence1': data['sentence1'],
93
- 'sentence2': data['sentence2'],
94
- 'label': str(data['label']),
95
  }
96
 
97
 
 
85
 
86
  def _generate_examples(self, filepath):
87
  with open(filepath, encoding='utf-8') as f:
88
+ data = json.load(f)
89
+ for i, row in enumerate(data):
90
  yield i, {
91
+ 'id': row['id'],
92
+ 'sentence1': row['sentence1'],
93
+ 'sentence2': row['sentence2'],
94
+ 'label': str(row['label']),
95
  }
96
 
97