hysts HF Staff commited on
Commit
53fe12d
·
verified ·
1 Parent(s): 039b454

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+
3
+ import gradio as gr
4
+ import spaces
5
+
6
+
7
+ @spaces.GPU(duration=10)
8
+ def fn():
9
+ time.sleep(5)
10
+ return "a"
11
+
12
+
13
+ with gr.Blocks() as demo:
14
+ btn = gr.Button()
15
+ out = gr.Textbox()
16
+ btn.click(fn=fn, outputs=out)
17
+ demo.launch()