Mds21 commited on
Commit
2b25ede
1 Parent(s): eb65f75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = "Hello, how are you?"
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']