Remove use of authentication token.
Browse files- src/translation.py +3 -2
src/translation.py
CHANGED
@@ -87,8 +87,9 @@ def translate_facebook(s:str, src_iso:str, dest_iso:str)-> str:
|
|
87 |
set_seed(555)
|
88 |
|
89 |
# Load model
|
90 |
-
tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M",
|
91 |
-
|
|
|
92 |
|
93 |
# Inference
|
94 |
encoded = tokenizer(s, return_tensors="pt")
|
|
|
87 |
set_seed(555)
|
88 |
|
89 |
# Load model
|
90 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M",src_lang=f"{src_iso}_Latn") #use_auth_token=True,
|
91 |
+
|
92 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M") #, use_auth_token=True)
|
93 |
|
94 |
# Inference
|
95 |
encoded = tokenizer(s, return_tensors="pt")
|