Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,8 @@ model_path = "anzorq/m2m100_418M_ft_ru-kbd_44K"
|
|
6 |
src_lang="ru"
|
7 |
tgt_lang="zu"
|
8 |
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained(model_path, src_lang=src_lang)
|
|
|
10 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
11 |
|
12 |
def translate(text, num_beams=4, num_return_sequences=4):
|
|
|
6 |
src_lang="ru"
|
7 |
tgt_lang="zu"
|
8 |
|
9 |
+
# tokenizer = AutoTokenizer.from_pretrained(model_path, src_lang=src_lang)
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
11 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
|
12 |
|
13 |
def translate(text, num_beams=4, num_return_sequences=4):
|