Jesus Carrasco commited on
Commit
6c32553
·
1 Parent(s): af1aba9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -26,21 +26,21 @@ def translate_text(text, target_language):
26
 
27
  return translated_text
28
 
29
- # Define the translator function
30
- def translate_text(text, target_language):
31
  # ... (the rest of the code)
32
 
33
- # Define the Gradio interface
34
- language_options = ["Spanish", "French", "Italian", "Ukrainian"]
35
- inputs = [
36
  inputs.Textbox(lines=5, label="Enter text to translate:"),
37
  inputs.Dropdown(choices=language_options, label="Select target language:"),
38
- ]
39
- outputs = outputs.Textbox(label="Translated text:")
40
 
41
- iface = gr.Interface(fn=translate_text, inputs=inputs, outputs=outputs, title="Language Translator")
42
 
43
- # Launch the Hugging Face Spaces app
44
- iface.launch()
45
 
46
 
 
26
 
27
  return translated_text
28
 
29
+ # Define the translator function
30
+ def translate_text(text, target_language):
31
  # ... (the rest of the code)
32
 
33
+ # Define the Gradio interface
34
+ language_options = ["Spanish", "French", "Italian", "Ukrainian"]
35
+ inputs = [
36
  inputs.Textbox(lines=5, label="Enter text to translate:"),
37
  inputs.Dropdown(choices=language_options, label="Select target language:"),
38
+ ]
39
+ outputs = outputs.Textbox(label="Translated text:")
40
 
41
+ iface = gr.Interface(fn=translate_text, inputs=inputs, outputs=outputs, title="Language Translator")
42
 
43
+ # Launch the Hugging Face Spaces app
44
+ iface.launch()
45
 
46