Erfan11 commited on
Commit
7478ec2
1 Parent(s): e25cd92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -3,12 +3,14 @@ import gradio as gr
3
  def respond_to_input(user_input):
4
  return f"You said: {user_input}"
5
 
 
6
  with gr.Blocks() as demo:
7
- # Define the input and output components
8
- input_textbox = gr.Textbox(label="Input", placeholder="Type something...")
9
- output_textbox = gr.Textbox(label="Output")
 
10
 
11
- # Link the input to the output
12
  input_textbox.submit(respond_to_input, inputs=input_textbox, outputs=output_textbox)
13
 
14
  # Launch the Gradio interface
 
3
  def respond_to_input(user_input):
4
  return f"You said: {user_input}"
5
 
6
+ # Define the Gradio interface
7
  with gr.Blocks() as demo:
8
+ # Create a row layout with input and output textboxes
9
+ with gr.Row():
10
+ input_textbox = gr.Textbox(label="Input", placeholder="Type something...", lines=1)
11
+ output_textbox = gr.Textbox(label="Output", interactive=False, lines=1)
12
 
13
+ # Link the input textbox to the output textbox
14
  input_textbox.submit(respond_to_input, inputs=input_textbox, outputs=output_textbox)
15
 
16
  # Launch the Gradio interface