KELONMYOSA commited on
Commit
1936404
·
1 Parent(s): 474780c

loading script

Browse files
Files changed (1) hide show
  1. dusha_emotion_audio.py +5 -4
dusha_emotion_audio.py CHANGED
@@ -55,10 +55,11 @@ class Dusha(datasets.GeneratorBasedBuilder):
55
  res = dict()
56
  res["file"] = full_audio_path
57
  res["label"] = label
58
- examples[full_audio_path](res)
59
 
60
  key = 0
61
  for path, f in audio_files:
62
- audio = {"path": path, "bytes": f.read()}
63
- yield key, {"file": path, "audio": audio, "label": "test"}
64
- key += 1
 
 
55
  res = dict()
56
  res["file"] = full_audio_path
57
  res["label"] = label
58
+ examples[full_audio_path] = res
59
 
60
  key = 0
61
  for path, f in audio_files:
62
+ if path in examples:
63
+ audio = {"path": path, "bytes": f.read()}
64
+ yield key, {**examples[path], "audio": audio}
65
+ key += 1