Spaces:
Running
Running
suhyun.kang
commited on
Commit
•
871741c
1
Parent(s):
b6833d5
remove if
Browse files
app.py
CHANGED
@@ -164,15 +164,10 @@ with gr.Blocks() as app:
|
|
164 |
visible=False)
|
165 |
|
166 |
def update_language_visibility(response_type):
|
167 |
-
|
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=
|
175 |
-
target_language: gr.Dropdown(visible=
|
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,
|