Update mysampledata.py
Browse files- mysampledata.py +1 -1
mysampledata.py
CHANGED
|
@@ -45,7 +45,7 @@ class MyData(datasets.GeneratorBasedBuilder):
|
|
| 45 |
"""This function returns the examples in the raw (text) form."""
|
| 46 |
logger.info("generating examples from = %s", filepath)
|
| 47 |
key = 0
|
| 48 |
-
with open(filepath
|
| 49 |
for line in f:
|
| 50 |
Obj = json.loads(line)
|
| 51 |
yield key, Obj
|
|
|
|
| 45 |
"""This function returns the examples in the raw (text) form."""
|
| 46 |
logger.info("generating examples from = %s", filepath)
|
| 47 |
key = 0
|
| 48 |
+
with open(filepath, encoding="utf-8") as f:
|
| 49 |
for line in f:
|
| 50 |
Obj = json.loads(line)
|
| 51 |
yield key, Obj
|