Update letras-carnaval-cadiz.py
Browse files- letras-carnaval-cadiz.py +6 -1
letras-carnaval-cadiz.py
CHANGED
@@ -91,7 +91,12 @@ class CadizCarnivalDataset(GeneratorBasedBuilder):
|
|
91 |
data_midaccurate = json.load(f)
|
92 |
data_all = data_accurate + data_midaccurate
|
93 |
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
def _generate_examples(self, filepath: str):
|
97 |
with open(filepath, encoding="utf-8") as f:
|
|
|
91 |
data_midaccurate = json.load(f)
|
92 |
data_all = data_accurate + data_midaccurate
|
93 |
|
94 |
+
# Write the combined data to a temporary file
|
95 |
+
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
|
96 |
+
json.dump(data_all, temp_file)
|
97 |
+
temp_filepath = temp_file.name
|
98 |
+
|
99 |
+
return [SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"data": temp_filepath})]
|
100 |
|
101 |
def _generate_examples(self, filepath: str):
|
102 |
with open(filepath, encoding="utf-8") as f:
|