ArissBandoss commited on
Commit
5f4aaf1
·
verified ·
1 Parent(s): ef4152c

Update goai_helpers/goai_traduction.py

Browse files
Files changed (1) hide show
  1. goai_helpers/goai_traduction.py +4 -0
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]