Lenylvt commited on
Commit
8e810bc
·
verified ·
1 Parent(s): 2189552

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -39,14 +39,14 @@ language_options = [
39
  language_dropdown_options = [(code, f"{name} ({code})") for code, name in language_options]
40
 
41
  # Create dropdowns for source and target languages
42
- source_language_dropdown = gr.inputs.Dropdown(choices=language_dropdown_options, label="Source Language")
43
- target_language_dropdown = gr.inputs.Dropdown(choices=language_dropdown_options, label="Target Language")
44
 
45
  # Define the interface
46
  iface = gr.Interface(
47
  fn=translate_text,
48
- inputs=[gr.inputs.Textbox(lines=2, placeholder="Enter text to translate..."), source_language_dropdown, target_language_dropdown],
49
- outputs=gr.outputs.Textbox(),
50
  title="Text Translator with Dynamic Helsinki NLP Models",
51
  description="Select source and target languages to translate text using Helsinki NLP models."
52
  )
 
39
  language_dropdown_options = [(code, f"{name} ({code})") for code, name in language_options]
40
 
41
  # Create dropdowns for source and target languages
42
+ source_language_dropdown = gr.Dropdown(choices=language_dropdown_options, label="Source Language")
43
+ target_language_dropdown = gr.Dropdown(choices=language_dropdown_options, label="Target Language")
44
 
45
  # Define the interface
46
  iface = gr.Interface(
47
  fn=translate_text,
48
+ inputs=[gr.Textbox(lines=2, placeholder="Enter text to translate..."), source_language_dropdown, target_language_dropdown],
49
+ outputs=gr.Textbox(),
50
  title="Text Translator with Dynamic Helsinki NLP Models",
51
  description="Select source and target languages to translate text using Helsinki NLP models."
52
  )