File size: 583 Bytes
14566e4
732d546
14566e4
 
ff60146
7478ec2
14566e4
7478ec2
 
 
 
c906021
7478ec2
e25cd92
 
 
14566e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr

def respond_to_input(user_input):
    return f"You said: {user_input}"

# Define the Gradio interface
with gr.Blocks() as demo:
    # Create a row layout with input and output textboxes
    with gr.Row():
        input_textbox = gr.Textbox(label="Input", placeholder="Type something...", lines=1)
        output_textbox = gr.Textbox(label="Output", interactive=False, lines=1)

    # Link the input textbox to the output textbox
    input_textbox.submit(respond_to_input, inputs=input_textbox, outputs=output_textbox)

# Launch the Gradio interface
demo.launch()