Upload many_emotions.py
Browse files- many_emotions.py +1 -1
many_emotions.py
CHANGED
@@ -195,7 +195,7 @@ class EmotionsDataset(datasets.GeneratorBasedBuilder):
|
|
195 |
yield uid, example
|
196 |
elif dataset == "many_emotions":
|
197 |
for _, folder in enumerate(filepaths):
|
198 |
-
for
|
199 |
with open(filepath, encoding="utf-8") as f:
|
200 |
for idx, line in enumerate(f):
|
201 |
example = json.loads(line)
|
|
|
195 |
yield uid, example
|
196 |
elif dataset == "many_emotions":
|
197 |
for _, folder in enumerate(filepaths):
|
198 |
+
for filepath in glob.glob(f"{folder}/*"):
|
199 |
with open(filepath, encoding="utf-8") as f:
|
200 |
for idx, line in enumerate(f):
|
201 |
example = json.loads(line)
|