Update goai_helpers/goai_traduction.py
Browse files
goai_helpers/goai_traduction.py
CHANGED
@@ -45,6 +45,10 @@ def goai_traduction(text, src_lang, tgt_lang):
|
|
45 |
early_stopping=False,
|
46 |
no_repeat_ngram_size=0 # Désactive la pénalité pour les répétitions
|
47 |
)
|
|
|
|
|
|
|
|
|
48 |
|
49 |
# Décodage de la sortie
|
50 |
translation = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|
|
|
45 |
early_stopping=False,
|
46 |
no_repeat_ngram_size=0 # Désactive la pénalité pour les répétitions
|
47 |
)
|
48 |
+
|
49 |
+
print("Token IDs:", outputs)
|
50 |
+
print("Tokens:", [tokenizer.decode([tok]) for tok in outputs[0]])
|
51 |
+
|
52 |
|
53 |
# Décodage de la sortie
|
54 |
translation = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
|