Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,11 +23,11 @@ def en_hi_translate(text):
|
|
23 |
translator = Translator()
|
24 |
|
25 |
# English text to be translated
|
26 |
-
english_text =
|
27 |
|
28 |
# Translate text from English to Hindi
|
29 |
translation = translator.translate(english_text, src='en', dest='hi')
|
30 |
-
return translation
|
31 |
|
32 |
# results = translation_pipeline('I love ice cream')
|
33 |
# results[0]['translation_text']
|
|
|
23 |
translator = Translator()
|
24 |
|
25 |
# English text to be translated
|
26 |
+
english_text = text
|
27 |
|
28 |
# Translate text from English to Hindi
|
29 |
translation = translator.translate(english_text, src='en', dest='hi')
|
30 |
+
return translation.text
|
31 |
|
32 |
# results = translation_pipeline('I love ice cream')
|
33 |
# results[0]['translation_text']
|