Spaces:
Runtime error
Runtime error
boli-ai-admin
commited on
Commit
·
a8a5280
1
Parent(s):
b92f2cf
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ tokenizer=AutoTokenizer.from_pretrained(model_name)
|
|
30 |
|
31 |
def translate(text, src_lang, tgt_lang):
|
32 |
translator=pipeline('translation', model=model, tokenizer=tokenizer, src_lang=INDIC[src_lang], tgt_lang=INDIC[tgt_lang], max_length=200)
|
33 |
-
return translator(text)['translation_text']
|
34 |
|
35 |
|
36 |
|
|
|
30 |
|
31 |
def translate(text, src_lang, tgt_lang):
|
32 |
translator=pipeline('translation', model=model, tokenizer=tokenizer, src_lang=INDIC[src_lang], tgt_lang=INDIC[tgt_lang], max_length=200)
|
33 |
+
return translator(text)[0]['translation_text']
|
34 |
|
35 |
|
36 |
|