ArissBandoss commited on
Commit
28ec2c5
·
verified ·
1 Parent(s): 488bb16

Update goai_helpers/goai_traduction.py

Browse files
Files changed (1) hide show
  1. goai_helpers/goai_traduction.py +2 -1
goai_helpers/goai_traduction.py CHANGED
@@ -51,7 +51,7 @@ def goai_traduction(text, src_lang, tgt_lang):
51
  print(f"Token ID de la langue cible ({tgt_lang}): {tgt_lang_id}")
52
 
53
  for length_penalty in [1.0, 1.5, 2.0]:
54
- for num_beams in [5, 8]:
55
  print(f"\nTest avec length_penalty={length_penalty}, num_beams={num_beams}")
56
 
57
 
@@ -62,6 +62,7 @@ def goai_traduction(text, src_lang, tgt_lang):
62
  early_stopping=False,
63
  num_beams=num_beams,
64
  no_repeat_ngram_size=0,
 
65
  length_penalty=length_penalty
66
  )
67
 
 
51
  print(f"Token ID de la langue cible ({tgt_lang}): {tgt_lang_id}")
52
 
53
  for length_penalty in [1.0, 1.5, 2.0]:
54
+ for num_beams in [5, 10]:
55
  print(f"\nTest avec length_penalty={length_penalty}, num_beams={num_beams}")
56
 
57
 
 
62
  early_stopping=False,
63
  num_beams=num_beams,
64
  no_repeat_ngram_size=0,
65
+ bad_words_ids=bad_words_ids,
66
  length_penalty=length_penalty
67
  )
68