Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def greet(
|
| 4 |
-
return "Hello "
|
| 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()
|