Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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)
|