Spaces:
Sleeping
Sleeping
rafaldembski
commited on
Commit
•
29027c1
1
Parent(s):
6705d35
Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,8 @@ def change_language(language, user_message, submit_button, clear_button):
|
|
92 |
gr.update(placeholder=selected_translation["input_placeholder"]),
|
93 |
gr.update(value=selected_translation["submit_button"]),
|
94 |
gr.update(value=selected_translation["clear_button"]),
|
95 |
-
selected_translation["description"]
|
|
|
96 |
)
|
97 |
|
98 |
# Tłumaczenia interfejsu
|
@@ -219,11 +220,7 @@ with gr.Blocks(analytics_enabled=False, theme=gr.themes.Monochrome()) as demo:
|
|
219 |
examples_per_page=3
|
220 |
)
|
221 |
|
222 |
-
|
223 |
-
return gr.update(examples=examples[language])
|
224 |
-
|
225 |
-
language_selector.change(fn=change_language, inputs=[language_selector, user_message, submit_button, clear_button], outputs=[user_message, submit_button, clear_button, description])
|
226 |
-
language_selector.change(fn=update_examples, inputs=[language_selector], outputs=[examples_component])
|
227 |
|
228 |
if __name__ == "__main__":
|
229 |
demo.queue(api_open=False, max_size=40).launch(show_api=False)
|
|
|
92 |
gr.update(placeholder=selected_translation["input_placeholder"]),
|
93 |
gr.update(value=selected_translation["submit_button"]),
|
94 |
gr.update(value=selected_translation["clear_button"]),
|
95 |
+
selected_translation["description"],
|
96 |
+
examples[language]
|
97 |
)
|
98 |
|
99 |
# Tłumaczenia interfejsu
|
|
|
220 |
examples_per_page=3
|
221 |
)
|
222 |
|
223 |
+
language_selector.change(fn=change_language, inputs=[language_selector, user_message, submit_button, clear_button], outputs=[user_message, submit_button, clear_button, description, examples_component])
|
|
|
|
|
|
|
|
|
224 |
|
225 |
if __name__ == "__main__":
|
226 |
demo.queue(api_open=False, max_size=40).launch(show_api=False)
|