Spaces:
Sleeping
Sleeping
Fix bug
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def greet(name, lang):
|
|
11 |
with gr.Blocks() as demo:
|
12 |
gr.Markdown(value="> Check out [Repository](https://github.com/hoveychen/gradio-i18n) for more examples")
|
13 |
lang = gr.Radio(choices=[("English", "en"), ("中文", "zh")], label=_("Language"))
|
14 |
-
with Translate("
|
15 |
name = gr.Textbox(label=_("Name"), placeholder=_("Input your name here."))
|
16 |
output = gr.Textbox(label=_("Greeting"))
|
17 |
submit_btn = gr.Button(value=_("Submit"))
|
|
|
11 |
with gr.Blocks() as demo:
|
12 |
gr.Markdown(value="> Check out [Repository](https://github.com/hoveychen/gradio-i18n) for more examples")
|
13 |
lang = gr.Radio(choices=[("English", "en"), ("中文", "zh")], label=_("Language"))
|
14 |
+
with Translate("translations.yaml", lang, placeholder_langs=["en", "zh"]):
|
15 |
name = gr.Textbox(label=_("Name"), placeholder=_("Input your name here."))
|
16 |
output = gr.Textbox(label=_("Greeting"))
|
17 |
submit_btn = gr.Button(value=_("Submit"))
|