import gradio as gr with gr.Blocks() as demo: with gr.Row(): textbox = gr.Textbox() textbox_2 = gr.Textbox() button = gr.Button() @button.click(inputs=[textbox, button], outputs=[textbox_2, button]) def fn_1(textbox, button): # Reverse the sentence in the textbox reversed_sentence = textbox[::-1] return (reversed_sentence, button) demo.launch()