fix json file reading
Browse files
NLVR2.py
CHANGED
|
@@ -100,7 +100,7 @@ class NLVR2Dataset(datasets.GeneratorBasedBuilder):
|
|
| 100 |
]
|
| 101 |
|
| 102 |
def _generate_examples(self, files_path):
|
| 103 |
-
json_file = json.
|
| 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 = {
|