import gradio as gr with gr.Blocks() as block: textbox = gr.Textbox(label="Enter your text here") bttn = gr.Button() output = gr.Textbox(label="Output") def submit(input_data): return input_data + "Submitted" bttn.click(submit, inputs=[textbox], outputs=[output]) block.launch()