ysharma HF staff commited on
Commit
8fdc208
1 Parent(s): 3d390d6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks() as demo:
4
+ show_box = gr.Checkbox()
5
+
6
+ @gr.render(inputs=show_box)
7
+ def render(show_box):
8
+ if show_box:
9
+ textbox = gr.Textbox()
10
+ textbox2 = gr.Textbox()
11
+ textbox.submit(lambda x:x, textbox, textbox2)
12
+ else:
13
+ gr.Markdown("Hidden textbox")
14
+
15
+ demo.launch(debug=True)