Xiaolong-Wang commited on
Commit
f150a4a
1 Parent(s): 989c6d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,14 +8,14 @@ import gradio as gr
8
 
9
  def greet(name, user_name):
10
  user_name += name
11
- return "Hello " + user_name + "!!"
12
 
13
  with gr.Blocks() as demo:
14
  user_name = gr.State(value='')
15
  name_input = gr.Textbox(visible = True,lines=1, label='Name input')
16
  name_output = gr.Textbox(visible = True,lines=1, label='Name output')
17
  btn = gr.Button(value="Send")
18
- btn.click(greet, inputs = [name_input, user_name], outputs=name_output)
19
  demo.queue()
20
  demo.launch() # server_port=7832, share=True
21
 
 
8
 
9
  def greet(name, user_name):
10
  user_name += name
11
+ return "Hello " + user_name + "!!", user_name
12
 
13
  with gr.Blocks() as demo:
14
  user_name = gr.State(value='')
15
  name_input = gr.Textbox(visible = True,lines=1, label='Name input')
16
  name_output = gr.Textbox(visible = True,lines=1, label='Name output')
17
  btn = gr.Button(value="Send")
18
+ btn.click(greet, inputs = [name_input, user_name], outputs=[name_output,user_name])
19
  demo.queue()
20
  demo.launch() # server_port=7832, share=True
21