Spaces:
Running
on
Zero
Running
on
Zero
Update goai_helpers/goai_traduction.py
Browse files
goai_helpers/goai_traduction.py
CHANGED
@@ -24,6 +24,11 @@ def goai_traduction(text, src_lang, tgt_lang):
|
|
24 |
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token, truncation=True, max_length=512)
|
26 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_id, token=auth_token).to(device)
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
# Ajout du code de langue source
|
29 |
tokenizer.src_lang = src_lang
|
|
|
24 |
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token, truncation=True, max_length=512)
|
26 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_id, token=auth_token).to(device)
|
27 |
+
|
28 |
+
print("decoder_start_token_id:", model.config.decoder_start_token_id)
|
29 |
+
print("forced_bos_token_id:", model.config.forced_bos_token_id)
|
30 |
+
print("eos_token_id:", model.config.eos_token_id)
|
31 |
+
|
32 |
|
33 |
# Ajout du code de langue source
|
34 |
tokenizer.src_lang = src_lang
|