Spaces:
Runtime error
Runtime error
alirezamsh
commited on
Commit
•
d512635
1
Parent(s):
df7bba0
Update app.py
Browse files
app.py
CHANGED
@@ -3,10 +3,11 @@ import os
|
|
3 |
|
4 |
os.system("pip install transformers sentencepiece torch")
|
5 |
|
6 |
-
from transformers import
|
|
|
7 |
|
8 |
-
|
9 |
-
|
10 |
|
11 |
def fn(text, lang):
|
12 |
tokenizer.tgt_lang = lang
|
|
|
3 |
|
4 |
os.system("pip install transformers sentencepiece torch")
|
5 |
|
6 |
+
from transformers import M2M100ForConditionalGeneration
|
7 |
+
from tokenization_small100 import SMALL100Tokenizer
|
8 |
|
9 |
+
model = M2M100ForConditionalGeneration.from_pretrained("alirezamsh/small100")
|
10 |
+
tokenizer = SMALL100Tokenizer.from_pretrained("alirezamsh/small100")
|
11 |
|
12 |
def fn(text, lang):
|
13 |
tokenizer.tgt_lang = lang
|