removed styles
Browse files
app.py
CHANGED
|
@@ -79,143 +79,6 @@ def chat_fn(message, history, persona_name):
|
|
| 79 |
|
| 80 |
with gr.Blocks() as demo:
|
| 81 |
|
| 82 |
-
# Inject custom CSS
|
| 83 |
-
gr.HTML("""
|
| 84 |
-
<style>
|
| 85 |
-
|
| 86 |
-
/* -------------------------
|
| 87 |
-
Global container styling
|
| 88 |
-
--------------------------*/
|
| 89 |
-
.gradio-container {
|
| 90 |
-
background-color: #F7F9FB !important; /* Softer neutral than pure blue tint */
|
| 91 |
-
font-family: 'Inter', sans-serif !important;
|
| 92 |
-
color: #1F2937 !important; /* Dark gray for readability */
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/* Center & refine the main title */
|
| 96 |
-
h1, h2, h3 {
|
| 97 |
-
text-align: center !important;
|
| 98 |
-
font-weight: 600 !important;
|
| 99 |
-
color: #1A73E8 !important;
|
| 100 |
-
margin-bottom: 10px !important;
|
| 101 |
-
}
|
| 102 |
-
|
| 103 |
-
/* -------------------------
|
| 104 |
-
Buttons
|
| 105 |
-
--------------------------*/
|
| 106 |
-
button.primary {
|
| 107 |
-
background-color: #1A73E8 !important;
|
| 108 |
-
border-color: #1A73E8 !important;
|
| 109 |
-
color: white !important;
|
| 110 |
-
font-weight: 600 !important;
|
| 111 |
-
border-radius: 6px !important;
|
| 112 |
-
padding: 8px 16px !important;
|
| 113 |
-
transition: background-color 0.2s ease-in-out;
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
button.primary:hover {
|
| 117 |
-
background-color: #1557B0 !important;
|
| 118 |
-
}
|
| 119 |
-
|
| 120 |
-
button.secondary, button.secondary:hover {
|
| 121 |
-
background-color: #E5E7EB !important;
|
| 122 |
-
color: #374151 !important;
|
| 123 |
-
border-radius: 6px !important;
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
/* Improve "Clear" button or other neutral buttons */
|
| 127 |
-
button:not(.primary):not(.secondary) {
|
| 128 |
-
background-color: #F3F4F6 !important;
|
| 129 |
-
color: #374151 !important;
|
| 130 |
-
border-radius: 6px !important;
|
| 131 |
-
}
|
| 132 |
-
|
| 133 |
-
/* -------------------------
|
| 134 |
-
Chat messages
|
| 135 |
-
--------------------------*/
|
| 136 |
-
.message.user {
|
| 137 |
-
background-color: #E5E7EB !important; /* Neutral grey bubble */
|
| 138 |
-
color: #1F2937 !important;
|
| 139 |
-
border-radius: 8px !important;
|
| 140 |
-
padding: 10px !important;
|
| 141 |
-
}
|
| 142 |
-
|
| 143 |
-
.message.bot {
|
| 144 |
-
background-color: #E8F1FF !important; /* Subtle blue tint to distinguish bot */
|
| 145 |
-
color: #1F2937 !important;
|
| 146 |
-
border-radius: 8px !important;
|
| 147 |
-
padding: 10px !important;
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
-
/* Optional subtle border around chatbot */
|
| 151 |
-
.gr-chatbot {
|
| 152 |
-
border-radius: 12px !important;
|
| 153 |
-
border: 1px solid #E5E7EB !important;
|
| 154 |
-
box-shadow: 0 2px 6px rgba(0,0,0,0.04) !important;
|
| 155 |
-
background-color: white !important;
|
| 156 |
-
color: #E8F1FF /*add test*/
|
| 157 |
-
}
|
| 158 |
-
|
| 159 |
-
/* -------------------------
|
| 160 |
-
Textboxes & inputs
|
| 161 |
-
--------------------------*/
|
| 162 |
-
textarea, input[type="text"] {
|
| 163 |
-
background-color: #FFFFFF !important;
|
| 164 |
-
color: #1F2937 !important;
|
| 165 |
-
border: 1px solid #D1D5DB !important;
|
| 166 |
-
border-radius: 6px !important;
|
| 167 |
-
padding: 10px !important;
|
| 168 |
-
}
|
| 169 |
-
|
| 170 |
-
textarea::placeholder, input::placeholder {
|
| 171 |
-
color: #1F2937 !important; /* Softer placeholder */
|
| 172 |
-
}
|
| 173 |
-
|
| 174 |
-
/* -------------------------
|
| 175 |
-
Radio & persona selector
|
| 176 |
-
--------------------------*/
|
| 177 |
-
.gr-radio {
|
| 178 |
-
background-color: white !important;
|
| 179 |
-
padding: 15px !important;
|
| 180 |
-
border-radius: 10px !important;
|
| 181 |
-
border: 1px solid #E5E7EB !important;
|
| 182 |
-
box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
.gr-radio label {
|
| 186 |
-
color: #374151 !important;
|
| 187 |
-
font-weight: 500 !important;
|
| 188 |
-
}
|
| 189 |
-
|
| 190 |
-
/* -------------------------
|
| 191 |
-
Markdown paragraphs
|
| 192 |
-
--------------------------*/
|
| 193 |
-
.gr-markdown {
|
| 194 |
-
text-align: center !important;
|
| 195 |
-
color: #000000 !important;
|
| 196 |
-
}
|
| 197 |
-
|
| 198 |
-
/* -------------------------
|
| 199 |
-
Cards / Panels
|
| 200 |
-
--------------------------*/
|
| 201 |
-
.gr-panel, .gr-box, .gr-group {
|
| 202 |
-
background-color: white !important;
|
| 203 |
-
border: 1px solid #E5E7EB !important;
|
| 204 |
-
border-radius: 12px !important;
|
| 205 |
-
padding: 12px !important;
|
| 206 |
-
box-shadow: 0 2px 5px rgba(0,0,0,0.04) !important;
|
| 207 |
-
}
|
| 208 |
-
|
| 209 |
-
/* -------------------------
|
| 210 |
-
Footer, examples, bottom elements
|
| 211 |
-
--------------------------*/
|
| 212 |
-
footer, .gr-examples, .gr-samples {
|
| 213 |
-
opacity: 0.8 !important;
|
| 214 |
-
}
|
| 215 |
-
|
| 216 |
-
</style>
|
| 217 |
-
""")
|
| 218 |
-
|
| 219 |
|
| 220 |
gr.Markdown(
|
| 221 |
"""
|
|
|
|
| 79 |
|
| 80 |
with gr.Blocks() as demo:
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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