Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return "Hello" + name + "!"
|
5 |
+
|
6 |
+
with gr.Blocks() as demo:
|
7 |
+
name = gr.Textbox(label = "Please enter your name below:")
|
8 |
+
output = gr.Textbox(label = "Output")
|
9 |
+
greet_button = gr.Button("Process")
|
10 |
+
greet_button.click(fn = greet, inputs = name, outputs = output)
|
11 |
+
|
12 |
+
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
13 |
+
|
14 |
+
demo.launch()
|