AMR-KELEG commited on
Commit
491aef1
·
1 Parent(s): 515d02b

Fix a bug

Browse files
Files changed (1) hide show
  1. eval_utils.py +2 -2
eval_utils.py CHANGED
@@ -25,8 +25,8 @@ def predict_top_p(model, tokenizer, text, P=0.9):
25
  break
26
 
27
  if (
28
- str(model.config.to_dict()["id2label"]["0"]) == "LABEL_0"
29
- or str(model.config.to_dict()["id2label"]["0"]) == "Algeria"
30
  ):
31
  return [DIALECTS[i] for i, p in enumerate(predictions) if p == 1]
32
  else:
 
25
  break
26
 
27
  if (
28
+ str(model.config.to_dict()["id2label"][0]) == "LABEL_0"
29
+ or str(model.config.to_dict()["id2label"][0]) == "Algeria"
30
  ):
31
  return [DIALECTS[i] for i, p in enumerate(predictions) if p == 1]
32
  else: