Update app.py
Browse files
app.py
CHANGED
@@ -40,39 +40,42 @@ def respond(
|
|
40 |
yield response
|
41 |
|
42 |
|
43 |
-
# Define custom CSS for
|
44 |
-
|
45 |
* {
|
46 |
margin: 0;
|
47 |
padding: 0;
|
48 |
box-sizing: border-box;
|
49 |
-
font-family: '
|
50 |
}
|
51 |
|
52 |
.gradio-container {
|
53 |
background-color: #ffffff; /* White background */
|
54 |
padding: 20px;
|
55 |
border-radius: 8px;
|
|
|
56 |
}
|
57 |
|
58 |
.gradio-button {
|
59 |
-
background-color: #
|
60 |
color: white;
|
61 |
border: none;
|
62 |
border-radius: 5px;
|
63 |
-
padding:
|
64 |
font-size: 16px;
|
65 |
cursor: pointer;
|
66 |
transition: background-color 0.3s ease;
|
67 |
}
|
68 |
|
69 |
.gradio-button:hover {
|
70 |
-
background-color: #
|
71 |
}
|
72 |
|
73 |
.gradio-slider {
|
74 |
-
background-color: #
|
75 |
border-radius: 8px;
|
|
|
|
|
76 |
}
|
77 |
|
78 |
.gradio-textbox {
|
@@ -86,7 +89,7 @@ flat_design_css = """
|
|
86 |
}
|
87 |
|
88 |
.gradio-textbox:focus {
|
89 |
-
border-color: #
|
90 |
}
|
91 |
|
92 |
.gradio-label {
|
@@ -101,6 +104,25 @@ flat_design_css = """
|
|
101 |
|
102 |
.gradio-chat {
|
103 |
background-color: #ffffff; /* White background for chat messages */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
105 |
"""
|
106 |
|
@@ -119,7 +141,7 @@ demo = gr.ChatInterface(
|
|
119 |
label="Top-p (nucleus sampling)",
|
120 |
),
|
121 |
],
|
122 |
-
css=
|
123 |
)
|
124 |
|
125 |
|
|
|
40 |
yield response
|
41 |
|
42 |
|
43 |
+
# Define custom CSS for Metro Design with a white background and red accents
|
44 |
+
metro_design_css = """
|
45 |
* {
|
46 |
margin: 0;
|
47 |
padding: 0;
|
48 |
box-sizing: border-box;
|
49 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
50 |
}
|
51 |
|
52 |
.gradio-container {
|
53 |
background-color: #ffffff; /* White background */
|
54 |
padding: 20px;
|
55 |
border-radius: 8px;
|
56 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Soft shadow */
|
57 |
}
|
58 |
|
59 |
.gradio-button {
|
60 |
+
background-color: #D32F2F; /* Metro red color */
|
61 |
color: white;
|
62 |
border: none;
|
63 |
border-radius: 5px;
|
64 |
+
padding: 12px 25px;
|
65 |
font-size: 16px;
|
66 |
cursor: pointer;
|
67 |
transition: background-color 0.3s ease;
|
68 |
}
|
69 |
|
70 |
.gradio-button:hover {
|
71 |
+
background-color: #C62828; /* Darker red */
|
72 |
}
|
73 |
|
74 |
.gradio-slider {
|
75 |
+
background-color: #f1f1f1;
|
76 |
border-radius: 8px;
|
77 |
+
border: 1px solid #ddd;
|
78 |
+
padding: 10px;
|
79 |
}
|
80 |
|
81 |
.gradio-textbox {
|
|
|
89 |
}
|
90 |
|
91 |
.gradio-textbox:focus {
|
92 |
+
border-color: #D32F2F; /* Red color */
|
93 |
}
|
94 |
|
95 |
.gradio-label {
|
|
|
104 |
|
105 |
.gradio-chat {
|
106 |
background-color: #ffffff; /* White background for chat messages */
|
107 |
+
border: 1px solid #ddd;
|
108 |
+
border-radius: 8px;
|
109 |
+
padding: 15px;
|
110 |
+
}
|
111 |
+
|
112 |
+
.gradio-chat .gradio-message {
|
113 |
+
background-color: #f1f1f1; /* Light gray for chat messages */
|
114 |
+
border-radius: 8px;
|
115 |
+
padding: 10px;
|
116 |
+
margin-bottom: 10px;
|
117 |
+
}
|
118 |
+
|
119 |
+
.gradio-chat .gradio-user-message {
|
120 |
+
background-color: #D32F2F; /* Red color for user messages */
|
121 |
+
color: white;
|
122 |
+
}
|
123 |
+
|
124 |
+
.gradio-chat .gradio-assistant-message {
|
125 |
+
background-color: #eeeeee; /* Lighter color for assistant's messages */
|
126 |
}
|
127 |
"""
|
128 |
|
|
|
141 |
label="Top-p (nucleus sampling)",
|
142 |
),
|
143 |
],
|
144 |
+
css=metro_design_css, # Applying the custom CSS
|
145 |
)
|
146 |
|
147 |
|