research14 commited on
Commit
75ef19a
·
1 Parent(s): a845f21

added custom css

Browse files
Files changed (1) hide show
  1. app.py +22 -7
app.py CHANGED
@@ -4,13 +4,28 @@ import gradio as gr
4
  def echo_text(input_text):
5
  return input_text
6
 
7
- # Create a Gradio interface
 
 
 
 
 
 
 
 
 
 
 
 
8
  iface = gr.Interface(
9
- fn=echo_text, # Echo text function
10
- inputs=gr.Textbox(text="Enter text here..."), # Text input field
11
- outputs=gr.Textbox(), # Display echoed text
12
- live=True # Real-time updates
 
 
 
 
13
  )
14
 
15
- # Launch the Gradio interface
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()