NadiaHolmlund commited on
Commit
14e381d
·
1 Parent(s): 84cec7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,13 +3,13 @@ from googletrans import Translator
3
 
4
  translator = Translator()
5
 
6
- def translate_text(text, dest_language):
7
- translation = translator.translate(text, dest=dest_language)
8
  return translation.text
9
 
10
  gradio_interface = gr.Interface(
11
  fn=translate_text,
12
- inputs=["text", "text"],
13
  outputs="text",
14
  title="Google Translate",
15
  description="Translate text using Google Translate API",
 
3
 
4
  translator = Translator()
5
 
6
+ def translate_text(text):
7
+ translation = translator.translate(text, dest="en")
8
  return translation.text
9
 
10
  gradio_interface = gr.Interface(
11
  fn=translate_text,
12
+ inputs="text",
13
  outputs="text",
14
  title="Google Translate",
15
  description="Translate text using Google Translate API",