Commit ·
7bf6cfb
1
Parent(s): 1101558
Update electricity.py
Browse files- electricity.py +6 -6
electricity.py
CHANGED
|
@@ -13,8 +13,8 @@ _HOMEPAGE = "TBD"
|
|
| 13 |
_LICENSE = "TBD"
|
| 14 |
|
| 15 |
_URLS = {
|
| 16 |
-
"train": "https://github.com/arthuractivemodeling/sandbox-data/blob/main/electricity/electricity_train.
|
| 17 |
-
"dev": "https://github.com/arthuractivemodeling/sandbox-data/blob/main/electricity/electricity_val.
|
| 18 |
}
|
| 19 |
|
| 20 |
|
|
@@ -57,7 +57,7 @@ class Electricity(datasets.GeneratorBasedBuilder):
|
|
| 57 |
|
| 58 |
def _generate_examples(self, filepath):
|
| 59 |
with open(filepath) as f:
|
| 60 |
-
|
| 61 |
-
for
|
| 62 |
-
|
| 63 |
-
|
|
|
|
| 13 |
_LICENSE = "TBD"
|
| 14 |
|
| 15 |
_URLS = {
|
| 16 |
+
"train": "https://github.com/arthuractivemodeling/sandbox-data/blob/main/electricity/electricity_train.json",
|
| 17 |
+
"dev": "https://github.com/arthuractivemodeling/sandbox-data/blob/main/electricity/electricity_val.json"
|
| 18 |
}
|
| 19 |
|
| 20 |
|
|
|
|
| 57 |
|
| 58 |
def _generate_examples(self, filepath):
|
| 59 |
with open(filepath) as f:
|
| 60 |
+
dataset = json.load(f)
|
| 61 |
+
for key in dataset:
|
| 62 |
+
yield key, dataset[key]
|
| 63 |
+
|