wenjiao commited on
Commit
f9c4160
·
1 Parent(s): 864ac7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,12 +12,12 @@ def update_language(value):
12
  return [gr.update(visible=False), gr.update(visible=True)]
13
 
14
  with gr.Blocks() as demo:
15
- with gr.Box() as zh:
16
  gr.Markdown(CN_md)
17
- with gr.Box() as eng:
18
  gr.Markdown(md)
19
 
20
- dt = gr.Textbox(label="Current time")
21
  dt.change(update_language, inputs=dt, outputs=[eng, zh])
22
 
23
  demo.load(None, inputs=None, outputs=dt, _js="() => navigator.language")
 
12
  return [gr.update(visible=False), gr.update(visible=True)]
13
 
14
  with gr.Blocks() as demo:
15
+ with gr.Box(visible=False) as zh:
16
  gr.Markdown(CN_md)
17
+ with gr.Box(visible=False) as eng:
18
  gr.Markdown(md)
19
 
20
+ dt = gr.Textbox(label="Current time", visible=False)
21
  dt.change(update_language, inputs=dt, outputs=[eng, zh])
22
 
23
  demo.load(None, inputs=None, outputs=dt, _js="() => navigator.language")