File size: 405 Bytes
4973851
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()