Erfan11 commited on
Commit
e25cd92
1 Parent(s): fe4d968

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -4,7 +4,12 @@ def respond_to_input(user_input):
4
  return f"You said: {user_input}"
5
 
6
  with gr.Blocks() as demo:
7
- gr.Textbox(label="Input", placeholder="Type something...").submit(respond_to_input)
8
- gr.Textbox(label="Output")
 
9
 
 
 
 
 
10
  demo.launch()
 
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
15
  demo.launch()