mohammad2928git commited on
Commit
304bdae
·
verified ·
1 Parent(s): 1593fc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
 
3
- def greet(name, intensity):
4
- return "Hello " * intensity + name + "!"
5
 
6
  with gr.Blocks() as demo:
7
  with gr.Row():
@@ -12,5 +12,6 @@ with gr.Blocks() as demo:
12
  btn2 = gr.Button("Clear", scale=1)
13
  btn3 = gr.Button("Clean Memory", scale=2)
14
  with gr.Column(scale=2):
15
- gr.Text(lines=15, label="Output", scale=2)
 
16
  demo.launch()
 
1
  import gradio as gr
2
 
3
+ def greet(inp):
4
+ return "Hello " + inp + "!"
5
 
6
  with gr.Blocks() as demo:
7
  with gr.Row():
 
12
  btn2 = gr.Button("Clear", scale=1)
13
  btn3 = gr.Button("Clean Memory", scale=2)
14
  with gr.Column(scale=2):
15
+ out_text = gr.Text(lines=15, label="Output", scale=2)
16
+ btn1.click(fn=greet, inputs=text1, outputs=out_text)
17
  demo.launch()