Spaces:
Running
Running
Update src/Translate.py
Browse files- src/Translate.py +1 -1
src/Translate.py
CHANGED
|
@@ -42,7 +42,7 @@ class Translators:
|
|
| 42 |
tgt_lang = f"{self.tl}_{self.tl.upper()}"
|
| 43 |
# Load model and tokenizer
|
| 44 |
# from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 45 |
-
tokenizer = AutoTokenizer.from_pretrained(self.model_name)
|
| 46 |
model = AutoModelForSeq2SeqLM.from_pretrained(self.model_name)
|
| 47 |
# model = MBartForConditionalGeneration.from_pretrained(self.model_name)
|
| 48 |
# tokenizer = MBartTokenizer.from_pretrained(self.model_name, src_lang=src_lang)
|
|
|
|
| 42 |
tgt_lang = f"{self.tl}_{self.tl.upper()}"
|
| 43 |
# Load model and tokenizer
|
| 44 |
# from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 45 |
+
tokenizer = AutoTokenizer.from_pretrained(self.model_name, src_lang=src_lang)
|
| 46 |
model = AutoModelForSeq2SeqLM.from_pretrained(self.model_name)
|
| 47 |
# model = MBartForConditionalGeneration.from_pretrained(self.model_name)
|
| 48 |
# tokenizer = MBartTokenizer.from_pretrained(self.model_name, src_lang=src_lang)
|