alirezamsh commited on
Commit
d512635
1 Parent(s): df7bba0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -3,10 +3,11 @@ import os
3
 
4
  os.system("pip install transformers sentencepiece torch")
5
 
6
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
 
7
 
8
- tokenizer = AutoTokenizer.from_pretrained("alirezamsh/small100")
9
- model = AutoModelForSeq2SeqLM.from_pretrained("alirezamsh/small100")
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