Spaces:
Sleeping
Sleeping
Commit
·
f725092
1
Parent(s):
c2483bf
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ model = torch.load("helsinki_fineTuned.pt", map_location=torch.device('cpu'))
|
|
15 |
|
16 |
|
17 |
def translate_gradio(input):
|
18 |
-
encode = model.generate(**tokenizer.prepare_seq2seq_batch(input,return_tensors='pt')
|
19 |
text_ar = tokenizer.batch_decode(encode,skip_special_tokens=True)[0]
|
20 |
return text_ar
|
21 |
|
|
|
15 |
|
16 |
|
17 |
def translate_gradio(input):
|
18 |
+
encode = model.generate(**tokenizer.prepare_seq2seq_batch(input,return_tensors='pt'))
|
19 |
text_ar = tokenizer.batch_decode(encode,skip_special_tokens=True)[0]
|
20 |
return text_ar
|
21 |
|