abidlabs HF staff commited on
Commit
205fec5
1 Parent(s): 046b7c6

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks() as demo:
4
+ d = gr.Dropdown(["Choice 1", "Choice 2", "Other"])
5
+ t = gr.Textbox(visible=False)
6
+ d.change(lambda x: gr.Dropdown.update(visible=x=="Other"), d, t)
7
+
8
+ demo.launch()