import gradio as gr def update(name): return f"liven" with gr.Blocks() as demo: btn = gr.Button("keep alive") btn.click(fn=update, inputs=inp, outputs=out) demo.launch()