harishB97 commited on
Commit
e5411ff
·
verified ·
1 Parent(s): 359b475

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -12
app.py CHANGED
@@ -172,20 +172,33 @@
172
 
173
  # demo.launch()
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  import gradio as gr
 
176
 
177
- def welcome(name):
178
- return f"Welcome to Gradio, {name}!"
 
 
179
 
180
- with gr.Blocks() as demo:
181
- gr.Markdown(
182
- """
183
- # Hello World!
184
- Start typing below to see the output.
185
- """)
186
- inp = gr.Textbox(placeholder="What is your name?")
187
- out = gr.Textbox()
188
- inp.change(welcome, inp, out)
189
 
190
- demo.launch()
191
 
 
172
 
173
  # demo.launch()
174
 
175
+ # import gradio as gr
176
+
177
+ # def welcome(name):
178
+ # return f"Welcome to Gradio, {name}!"
179
+
180
+ # with gr.Blocks() as demo:
181
+ # gr.Markdown(
182
+ # """
183
+ # # Hello World!
184
+ # Start typing below to see the output.
185
+ # """)
186
+ # inp = gr.Textbox(placeholder="What is your name?")
187
+ # out = gr.Textbox()
188
+ # inp.change(welcome, inp, out)
189
+
190
+ # demo.launch()
191
+
192
  import gradio as gr
193
+ import time
194
 
195
+ with gr.Blocks() as interface:
196
+ dropdown = gr.Dropdown(choices=["Anna", "Christine", "Phoebe"])
197
+ dropdown2 = gr.Dropdown(choices=["Anna", "Christine", "Phoebe"])
198
+ btn = gr.Button("Trigger!")
199
 
200
+ btn.click(lambda: "Phoebe", None, dropdown)
201
+ dropdown.change(lambda x: x, dropdown, dropdown2)
 
 
 
 
 
 
 
202
 
203
+ interface.launch()
204