DebasishDhal99 commited on
Commit
cd7cb7e
·
1 Parent(s): 683a07d

Adding .text to the translator function

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -46,7 +46,7 @@ translator = Translator()
46
 
47
  def random_sentence(lang):
48
  sentence=gen.sentence() #Generates a random but coherent sentence in English
49
- return translator.translate(sentence,dest=lang) #Translates the sentence to target language
50
 
51
 
52
  tab1, tab2, tab3= st.tabs(["Polish/Polski", "Hungarian/Magyar", "Turkish/Türkçe"])
 
46
 
47
  def random_sentence(lang):
48
  sentence=gen.sentence() #Generates a random but coherent sentence in English
49
+ return str(translator.translate(sentence,dest=lang).text) #Translates the sentence to target language
50
 
51
 
52
  tab1, tab2, tab3= st.tabs(["Polish/Polski", "Hungarian/Magyar", "Turkish/Türkçe"])