Patt commited on
Commit
31e634c
·
1 Parent(s): 1d5cc21

edit result

Browse files

edit results to show only text

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,8 +4,8 @@ from transformers import pipeline
4
  translation = pipeline("translation", "Shularp/krirk-finetuned-Helsinki-NLP_opus-mt-ar-en")
5
 
6
  def translate(text):
7
- result = translation(text)
8
- return result
9
 
10
 
11
 
 
4
  translation = pipeline("translation", "Shularp/krirk-finetuned-Helsinki-NLP_opus-mt-ar-en")
5
 
6
  def translate(text):
7
+ results = translation(text)
8
+ return [result['translation_text'] for result in results]
9
 
10
 
11