Update goai_helpers/goai_traduction.py
Browse files
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,
|
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 |
|