Spaces:
Runtime error
Runtime error
Commit
·
1801662
1
Parent(s):
771b9c6
applying changes to interface
Browse files
app.py
CHANGED
|
@@ -4,30 +4,14 @@ import gradio as gr
|
|
| 4 |
def echo_text(input_text):
|
| 5 |
return input_text
|
| 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 |
-
}
|
| 15 |
-
.gr-textbox:focus {
|
| 16 |
-
border: 2px solid #009688;
|
| 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.
|
| 25 |
-
gr.
|
| 26 |
-
gr.
|
| 27 |
-
layout="rows" # Arrange input and output in a vertical column
|
| 28 |
),
|
| 29 |
live=True
|
| 30 |
)
|
| 31 |
|
| 32 |
-
|
| 33 |
-
iface.launch(share=True)
|
|
|
|
| 4 |
def echo_text(input_text):
|
| 5 |
return input_text
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
iface = gr.Interface(
|
| 8 |
fn=echo_text,
|
| 9 |
+
inputs=gr.Textbox(text="Enter text here...", label="Input Text"), # Text input field with a label
|
| 10 |
+
outputs=gr.Row( # Create a row layout for input and output
|
| 11 |
+
gr.Text(label="Input Text:", type="output"), # Display input text above output
|
| 12 |
+
gr.Text(label="Output Text:", type="output"), # Display output text
|
|
|
|
| 13 |
),
|
| 14 |
live=True
|
| 15 |
)
|
| 16 |
|
| 17 |
+
iface.launch()
|
|
|