Spaces:
Running
on
Zero
Running
on
Zero
Update goai_helpers/goai_traduction.py
Browse files
goai_helpers/goai_traduction.py
CHANGED
@@ -57,10 +57,10 @@ def translate_chunk(text, src_lang, tgt_lang):
|
|
57 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
58 |
|
59 |
if src_lang == "mos_Latn" and tgt_lang == "fra_Latn":
|
60 |
-
model_id = "ArissBandoss/
|
61 |
else:
|
62 |
-
|
63 |
-
model_id = "ArissBandoss/nllb-200-3.3B-mos-fr-bidirectional-peft"
|
64 |
|
65 |
tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token)
|
66 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_id, token=auth_token).to(device)
|
|
|
57 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
58 |
|
59 |
if src_lang == "mos_Latn" and tgt_lang == "fra_Latn":
|
60 |
+
model_id = "ArissBandoss/nllb-200-3.3B-mos2fr"
|
61 |
else:
|
62 |
+
model_id = "ArissBandoss/nllb-200-3.3B-fr2mos"
|
63 |
+
#model_id = "ArissBandoss/nllb-200-3.3B-mos-fr-bidirectional-peft"
|
64 |
|
65 |
tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token)
|
66 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_id, token=auth_token).to(device)
|