import gradio as gr import main def update(name): print("being kept alive!") return "alive" with gr.Blocks() as demo: btn = gr.Button("keep alive") btn.click(fn=update) demo.launch()