Leyo commited on
Commit
5a7a94d
·
1 Parent(s): 1a56012

fix json file reading

Browse files
Files changed (1) hide show
  1. NLVR2.py +1 -1
NLVR2.py CHANGED
@@ -100,7 +100,7 @@ class NLVR2Dataset(datasets.GeneratorBasedBuilder):
100
  ]
101
 
102
  def _generate_examples(self, files_path):
103
- json_file = json.load(open(files_path, "r"))
104
 
105
  for i, ex in enumerate(json_file):
106
  record = {
 
100
  ]
101
 
102
  def _generate_examples(self, files_path):
103
+ json_file = [json.loads(line) for line in open(files_path).readlines()]
104
 
105
  for i, ex in enumerate(json_file):
106
  record = {