Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
8 |
-
|
9 |
-
|
|
|
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
|