import gradio as gr val = None def respond(newVal): global val if(val is None): val = newVal return val demo = gr.Interface(fn=respond, inputs = [gr.Textbox()], outputs= [gr.Textbox()], title = 'Simplify') demo.launch()