multimodalart HF Staff commited on
Commit
b40a619
·
verified ·
1 Parent(s): a9024a0

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import spaces
3
+
4
+ @spaces.GPU
5
+ def update(name):
6
+ return f"Welcome to Gradio, {name}!"
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()