Spaces:
Runtime error
Runtime error
Commit
·
f5c619d
1
Parent(s):
5203c07
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ def mirror(x):
|
|
12 |
|
13 |
with gr.Blocks() as demo:
|
14 |
|
|
|
|
|
15 |
txt = gr.Textbox(label="Input", lines=2)
|
16 |
txt_2 = gr.Textbox(label="Input 2")
|
17 |
txt_3 = gr.Textbox(value="", label="Output")
|
@@ -25,6 +27,7 @@ with gr.Blocks() as demo:
|
|
25 |
btn = gr.Button(value="Mirror Image")
|
26 |
btn.click(mirror, inputs=[im], outputs=[im_2])
|
27 |
|
|
|
28 |
|
29 |
|
30 |
if __name__ == "__main__":
|
|
|
12 |
|
13 |
with gr.Blocks() as demo:
|
14 |
|
15 |
+
change_language_radio = gr.Radio(["Chinese", "English"])
|
16 |
+
language = gr.Textbox(label="Language")
|
17 |
txt = gr.Textbox(label="Input", lines=2)
|
18 |
txt_2 = gr.Textbox(label="Input 2")
|
19 |
txt_3 = gr.Textbox(value="", label="Output")
|
|
|
27 |
btn = gr.Button(value="Mirror Image")
|
28 |
btn.click(mirror, inputs=[im], outputs=[im_2])
|
29 |
|
30 |
+
change_language_radio.change(None, [], [language], _js="() => navigator.language")
|
31 |
|
32 |
|
33 |
if __name__ == "__main__":
|