File size: 294 Bytes
7cdc41c
 
 
 
 
 
 
 
 
 
 
 
 
51ad3d5
7cdc41c
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
import spaces


@spaces.GPU(duration=181)
def inner_fn():
    return "test"


def wrapper_fn():
    return inner_fn()


wrapper_fn.zerogpu = True


with gr.Blocks() as demo:
    btn = gr.Button()
    out = gr.Textbox()
    btn.click(fn=wrapper_fn, outputs=out)
demo.launch()