Spaces:
Runtime error
Runtime error
Commit
·
75ef19a
1
Parent(s):
a845f21
added custom css
Browse files
app.py
CHANGED
@@ -4,13 +4,28 @@ import gradio as gr
|
|
4 |
def echo_text(input_text):
|
5 |
return input_text
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
iface = gr.Interface(
|
9 |
-
fn=echo_text,
|
10 |
-
inputs=gr.Textbox(text="Enter text here..."),
|
11 |
-
outputs=gr.Textbox(),
|
12 |
-
live=True
|
|
|
|
|
|
|
|
|
13 |
)
|
14 |
|
15 |
-
|
16 |
-
iface.launch()
|
|
|
4 |
def echo_text(input_text):
|
5 |
return input_text
|
6 |
|
7 |
+
custom_css = """
|
8 |
+
.gr-textbox {
|
9 |
+
background-color: #f2f2f2;
|
10 |
+
color: #333;
|
11 |
+
font-size: 16px;
|
12 |
+
border: 2px solid #666;
|
13 |
+
padding: 10px;
|
14 |
+
}
|
15 |
+
.gr-textbox:focus {
|
16 |
+
border: 2px solid #009688;
|
17 |
+
}
|
18 |
+
"""
|
19 |
+
|
20 |
iface = gr.Interface(
|
21 |
+
fn=echo_text,
|
22 |
+
inputs=gr.Textbox(text="Enter text here...", style=custom_css),
|
23 |
+
outputs=gr.Textbox(style=custom_css),
|
24 |
+
live=True,
|
25 |
+
title="Professional Text Echo Interface",
|
26 |
+
width=500,
|
27 |
+
height=200,
|
28 |
+
theme="light" # You can use "dark" for a dark theme
|
29 |
)
|
30 |
|
31 |
+
iface.launch()
|
|