balaramas commited on
Commit
cd174b7
·
verified ·
1 Parent(s): de27d02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -47
app.py CHANGED
@@ -5,56 +5,12 @@ def greet(name):
5
  return f"Hello, {name}!"
6
 
7
  # Customize the interface
8
- interface = gr.Interface(
9
  greet,
10
  inputs=gr.Textbox(label="Enter your name", placeholder="Type here..."),
11
  outputs="text",
 
12
  title="Greeting App", # Set a title for your app
13
  allow_flagging=False, # Disable flagging feature
14
  flagging_options=["Inappropriate", "Irrelevant"], # Customize flagging options
15
- )
16
-
17
- # Custom CSS
18
- custom_css = """
19
- <style>
20
- /* Change background color */
21
- .gradio {
22
- background-color: #f0f0f0; /* Light gray */
23
- }
24
-
25
- /* Change input box color */
26
- .gr-textbox input[type="text"] {
27
- background-color: #ffffff; /* White */
28
- border: 2px solid #3498db; /* Border color */
29
- }
30
-
31
- /* Change button color */
32
- .gradio-button {
33
- background-color: #3498db; /* Blue */
34
- color: #ffffff; /* White */
35
- border: 2px solid #3498db; /* Border color */
36
- }
37
-
38
- /* Add animation */
39
- .gradio-interface {
40
- animation: fadeInUp 0.5s ease; /* Define animation */
41
- }
42
-
43
- @keyframes fadeInUp {
44
- from {
45
- opacity: 0;
46
- transform: translateY(20px);
47
- }
48
- to {
49
- opacity: 1;
50
- transform: translateY(0);
51
- }
52
- }
53
- </style>
54
- """
55
-
56
- # Inject custom CSS into interface
57
- interface.css = custom_css
58
-
59
- # Launch the interface
60
- interface.launch()
 
5
  return f"Hello, {name}!"
6
 
7
  # Customize the interface
8
+ gr.Interface(
9
  greet,
10
  inputs=gr.Textbox(label="Enter your name", placeholder="Type here..."),
11
  outputs="text",
12
+ theme="base", # Change the overall color theme: "light" or "dark"
13
  title="Greeting App", # Set a title for your app
14
  allow_flagging=False, # Disable flagging feature
15
  flagging_options=["Inappropriate", "Irrelevant"], # Customize flagging options
16
+ ).launch()