freddyaboulton HF Staff commited on
Commit
7aafe66
·
1 Parent(s): 3f3de3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -6,6 +6,11 @@ with gr.Blocks() as demo:
6
  text = gr.Text()
7
  out = gr.Text()
8
  btn = gr.Button()
 
9
  text.submit(fn=lambda x: x, inputs=text, outputs=out, api_name=False)
10
  btn.click(fn=lambda x: x, inputs=text, outputs=out, api_name='run')
 
 
 
 
11
  demo.queue().launch()
 
6
  text = gr.Text()
7
  out = gr.Text()
8
  btn = gr.Button()
9
+ btn2 = gr.Button()
10
  text.submit(fn=lambda x: x, inputs=text, outputs=out, api_name=False)
11
  btn.click(fn=lambda x: x, inputs=text, outputs=out, api_name='run')
12
+ btn2.click(fn=lambda x: "hello", inputs=text, outputs=out, api_name='say_hello')
13
+ text.change(fn=lambda x: x, inputs=text, outputs=out, api_name=False)
14
+
15
+
16
  demo.queue().launch()