Datasets:
ToluClassics
commited on
Commit
·
770c4fa
1
Parent(s):
9c28f33
Update afriqa.py
Browse files
afriqa.py
CHANGED
@@ -101,7 +101,7 @@ class AfriQA(datasets.GeneratorBasedBuilder):
|
|
101 |
|
102 |
def _generate_examples(self, filepath):
|
103 |
"""Yields examples."""
|
104 |
-
with jsonlines.open(filepath
|
105 |
for _, example in enumerate(f):
|
106 |
_id = example["id"]
|
107 |
|
|
|
101 |
|
102 |
def _generate_examples(self, filepath):
|
103 |
"""Yields examples."""
|
104 |
+
with jsonlines.open(filepath) as f:
|
105 |
for _, example in enumerate(f):
|
106 |
_id = example["id"]
|
107 |
|