qgyd2021 commited on
Commit
27d3705
·
1 Parent(s): b72e90e
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -28,8 +28,9 @@ def main():
28
  ):
29
  model_group = model_dict.get(model_name)
30
  if model_group is None:
31
- for k, mg in model_dict.items():
32
- del mg["model"]
 
33
  model_dict[model_name] = {
34
  "model": M2M100ForConditionalGeneration.from_pretrained(model_name),
35
  "tokenizer": M2M100Tokenizer.from_pretrained(model_name)
 
28
  ):
29
  model_group = model_dict.get(model_name)
30
  if model_group is None:
31
+ for k in list(model_dict.keys()):
32
+ del model_dict[k]
33
+
34
  model_dict[model_name] = {
35
  "model": M2M100ForConditionalGeneration.from_pretrained(model_name),
36
  "tokenizer": M2M100Tokenizer.from_pretrained(model_name)