import gradio as gr def simple_search(query): return f"You searched for: {query}" # Gradio Interface with gr.Blocks() as demo: query = gr.Textbox(label="Search the web") output = gr.Textbox(label="Results") submit_btn = gr.Button("Submit") submit_btn.click(simple_search, query, output) demo.launch()