suhyun.kang commited on
Commit
871741c
1 Parent(s): b6833d5
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -164,15 +164,10 @@ with gr.Blocks() as app:
164
  visible=False)
165
 
166
  def update_language_visibility(response_type):
167
- if response_type != ResponseType.TRANSLATE.value:
168
- return {
169
- source_language: gr.Dropdown(visible=False),
170
- target_language: gr.Dropdown(visible=False)
171
- }
172
-
173
  return {
174
- source_language: gr.Dropdown(visible=True),
175
- target_language: gr.Dropdown(visible=True)
176
  }
177
 
178
  response_type_radio.change(update_language_visibility, response_type_radio,
 
164
  visible=False)
165
 
166
  def update_language_visibility(response_type):
167
+ visible = response_type == ResponseType.TRANSLATE.value
 
 
 
 
 
168
  return {
169
+ source_language: gr.Dropdown(visible=visible),
170
+ target_language: gr.Dropdown(visible=visible)
171
  }
172
 
173
  response_type_radio.change(update_language_visibility, response_type_radio,