Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -105,10 +105,10 @@ def translateIn(SourceText, direction):
|
|
105 |
# return translate_kin_to_en(SourceText)
|
106 |
if direction == "English to Sesotho":
|
107 |
text = translate(text=SourceText, src_lang='eng_Latn', tgt_lang='ses_Latn')
|
108 |
-
return text
|
109 |
if direction == "Sesotho to English":
|
110 |
text = translate(text=SourceText, src_lang='tsn_Latn', tgt_lang='eng_Latn')
|
111 |
-
return text
|
112 |
# if direction == "English to Tswana":
|
113 |
# return translate == translate_en_to_tsn(SourceText)
|
114 |
|
|
|
105 |
# return translate_kin_to_en(SourceText)
|
106 |
if direction == "English to Sesotho":
|
107 |
text = translate(text=SourceText, src_lang='eng_Latn', tgt_lang='ses_Latn')
|
108 |
+
return text[0]
|
109 |
if direction == "Sesotho to English":
|
110 |
text = translate(text=SourceText, src_lang='tsn_Latn', tgt_lang='eng_Latn')
|
111 |
+
return text[0]
|
112 |
# if direction == "English to Tswana":
|
113 |
# return translate == translate_en_to_tsn(SourceText)
|
114 |
|