Spaces:
Running
Running
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return f"Hello, {name}!"
|
5 |
+
|
6 |
+
with gr.Blocks() as demo:
|
7 |
+
name_input = gr.Textbox(label="Enter your name")
|
8 |
+
greet_button = gr.Button("Greet")
|
9 |
+
output_text = gr.Textbox(label="Greeting")
|
10 |
+
|
11 |
+
greet_button.click(fn=greet, inputs=name_input, outputs=output_text)
|
12 |
+
|
13 |
+
demo.launch()
|