Commit
·
9ffc800
1
Parent(s):
fe7e01a
add application
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def greet(name):
|
4 |
+
return "Codingon " + name + "!"
|
5 |
+
|
6 |
+
with gr.Blocks() as demo:
|
7 |
+
name = gr.Textbox(label="Name")
|
8 |
+
output = gr.Textbox(label="Output Box")
|
9 |
+
greet_btn = gr.Button("Greet")
|
10 |
+
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
11 |
+
|
12 |
+
if __name__ == "__main__":
|
13 |
+
demo.launch()
|
14 |
+
|