NadiaHolmlund commited on
Commit
b8446db
·
1 Parent(s): 1d971c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -6,14 +6,13 @@ translator = googletrans.Translator()
6
  def translate(text):
7
  result = translator.translate(text, dest='en')
8
  translation = result.text
9
- pronunciation = translator.translate(translation, dest='ja').pronunciation
10
- return f"Pronunciation: {pronunciation}", f"Translation: {translation}"
11
 
12
  iface = gr.Interface(
13
  fn=translate,
14
  inputs="text",
15
- outputs=["text", "text"],
16
- output_labels=["Pronunciation", "Translation"],
17
  title="Google Translate"
18
  )
19
 
 
6
  def translate(text):
7
  result = translator.translate(text, dest='en')
8
  translation = result.text
9
+ return translation
 
10
 
11
  iface = gr.Interface(
12
  fn=translate,
13
  inputs="text",
14
+ outputs="text"
15
+ output_labels= translation
16
  title="Google Translate"
17
  )
18