Textwizai / app.py
Erfan11's picture
Update app.py
7478ec2 verified
raw
history blame
No virus
583 Bytes
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()