Spaces:
Sleeping
Sleeping
Commit
•
9b83b7b
1
Parent(s):
cb587cd
Adding new files
Browse files- app.py +16 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
|
4 |
+
def update(name):
|
5 |
+
return f"Welcome to Gradio, {name}!"
|
6 |
+
|
7 |
+
|
8 |
+
with gr.Blocks() as demo:
|
9 |
+
gr.Markdown("Start typing below and then click **Run** to see the output.")
|
10 |
+
with gr.Row():
|
11 |
+
inp = gr.Textbox(placeholder="What is your name?")
|
12 |
+
out = gr.Textbox()
|
13 |
+
btn = gr.Button("Run")
|
14 |
+
btn.click(fn=update, inputs=inp, outputs=out)
|
15 |
+
|
16 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio==4.5.0
|