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()