Jesus Carrasco commited on
Commit
59e6f0a
1 Parent(s): c36106a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -27,12 +27,13 @@ def translate_text(text, target_language):
27
  # Define the Gradio interface
28
  language_options = ["Spanish", "French", "Italian", "Ukrainian"]
29
  inputs = [
30
- gr.inputs.Textbox(lines=5, label="Enter text to translate:"),
31
- gr.inputs.Dropdown(choices=language_options, label="Select target language:"),
32
  ]
33
- outputs = gr.outputs.Textbox(label="Translated text:")
34
 
35
  iface = gr.Interface(fn=translate_text, inputs=inputs, outputs=outputs, title="Language Translator")
36
 
37
  # Launch the Hugging Face Spaces app
38
  iface.launch()
 
 
27
  # Define the Gradio interface
28
  language_options = ["Spanish", "French", "Italian", "Ukrainian"]
29
  inputs = [
30
+ gr.components.Input(type="textbox", lines=5, label="Enter text to translate:"),
31
+ gr.components.Input(type="dropdown", choices=language_options, label="Select target language:"),
32
  ]
33
+ outputs = gr.components.Output(type="textbox", label="Translated text:")
34
 
35
  iface = gr.Interface(fn=translate_text, inputs=inputs, outputs=outputs, title="Language Translator")
36
 
37
  # Launch the Hugging Face Spaces app
38
  iface.launch()
39
+