wsntxxn commited on
Commit
52e4635
·
verified ·
1 Parent(s): b32bfa6

Upload Cnn8RnnSoundEventDetection

Browse files
Files changed (1) hide show
  1. hf_model.py +2 -2
hf_model.py CHANGED
@@ -222,6 +222,6 @@ class Cnn8RnnSoundEventDetection(PreTrainedModel):
222
  model = super().from_pretrained(pretrained_model_name_or_path,
223
  *model_args, **kwargs)
224
  class_file = cached_file(pretrained_model_name_or_path, "classes.txt")
225
- with open(class_file, "w") as f:
226
  model.classes = [l.strip() for l in f]
227
- return model
 
222
  model = super().from_pretrained(pretrained_model_name_or_path,
223
  *model_args, **kwargs)
224
  class_file = cached_file(pretrained_model_name_or_path, "classes.txt")
225
+ with open(class_file, "r") as f:
226
  model.classes = [l.strip() for l in f]
227
+ return model