Spaces:
Runtime error
Runtime error
Commit
·
771b9c6
1
Parent(s):
75ef19a
layout change
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ def echo_text(input_text):
|
|
6 |
|
7 |
custom_css = """
|
8 |
.gr-textbox {
|
9 |
-
background-color:
|
10 |
color: #333;
|
11 |
-
font-size:
|
12 |
border: 2px solid #666;
|
13 |
padding: 10px;
|
14 |
}
|
@@ -17,15 +17,17 @@ custom_css = """
|
|
17 |
}
|
18 |
"""
|
19 |
|
|
|
20 |
iface = gr.Interface(
|
21 |
fn=echo_text,
|
22 |
-
inputs=gr.Textbox(text="Enter text here...",
|
23 |
-
outputs=gr.
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
)
|
30 |
|
31 |
-
|
|
|
|
6 |
|
7 |
custom_css = """
|
8 |
.gr-textbox {
|
9 |
+
background-color: rgb(79, 129, 145);
|
10 |
color: #333;
|
11 |
+
font-size: 30px;
|
12 |
border: 2px solid #666;
|
13 |
padding: 10px;
|
14 |
}
|
|
|
17 |
}
|
18 |
"""
|
19 |
|
20 |
+
# Create a Gradio interface with input above output
|
21 |
iface = gr.Interface(
|
22 |
fn=echo_text,
|
23 |
+
inputs=gr.Textbox(text="Enter text here..."), # Text input field
|
24 |
+
outputs=gr.Column( # Create a column layout for input and output
|
25 |
+
gr.Textbox(text="Input Text:", output=False), # Display input text above output
|
26 |
+
gr.Textbox(text="Output Text:", output=True), # Display output text
|
27 |
+
layout="rows" # Arrange input and output in a vertical column
|
28 |
+
),
|
29 |
+
live=True
|
30 |
)
|
31 |
|
32 |
+
# Launch the Gradio interface
|
33 |
+
iface.launch(share=True)
|