hysts HF staff commited on
Commit
7cdc41c
1 Parent(s): 156ed95

Create app.py

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