roll back
Browse files
app.py
CHANGED
|
@@ -79,137 +79,88 @@ def chat_fn(message, history, persona_name):
|
|
| 79 |
|
| 80 |
with gr.Blocks() as demo:
|
| 81 |
|
| 82 |
-
#
|
| 83 |
gr.HTML("""
|
| 84 |
<style>
|
| 85 |
-
|
| 86 |
-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
|
| 87 |
|
| 88 |
-
/* Global font application */
|
| 89 |
* {
|
| 90 |
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
|
| 91 |
}
|
| 92 |
|
| 93 |
-
/* Main container - light grey background */
|
| 94 |
.gradio-container {
|
| 95 |
-
background
|
| 96 |
}
|
| 97 |
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
border-radius: 8px !important;
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
/* Typography - dark blue for readability */
|
| 106 |
-
h1, h2, h3, h4, h5, h6 {
|
| 107 |
-
color: #1E3A8A !important;
|
| 108 |
-
font-weight: 600 !important;
|
| 109 |
-
}
|
| 110 |
-
|
| 111 |
-
p, span, div, label {
|
| 112 |
-
color: #1E3A8A !important;
|
| 113 |
}
|
| 114 |
|
| 115 |
-
/* Primary button - soft professional blue */
|
| 116 |
button.primary {
|
| 117 |
-
background-color: #
|
| 118 |
-
color: #
|
| 119 |
-
border: none !important;
|
| 120 |
font-weight: 500 !important;
|
| 121 |
-
|
| 122 |
-
border-radius: 6px !important;
|
| 123 |
-
transition: background-color 0.2s !important;
|
| 124 |
}
|
| 125 |
|
| 126 |
button.primary:hover {
|
| 127 |
-
background-color: #
|
|
|
|
|
|
|
| 128 |
}
|
| 129 |
|
| 130 |
-
/* Secondary buttons - light grey */
|
| 131 |
-
button:not(.primary) {
|
| 132 |
-
background-color: #F3F4F6 !important;
|
| 133 |
-
color: #1F2937 !important;
|
| 134 |
-
border: 1px solid #E5E7EB !important;
|
| 135 |
-
font-weight: 500 !important;
|
| 136 |
-
padding: 8px 16px !important;
|
| 137 |
-
border-radius: 6px !important;
|
| 138 |
-
transition: background-color 0.2s !important;
|
| 139 |
-
}
|
| 140 |
-
|
| 141 |
-
button:not(.primary):hover {
|
| 142 |
-
background-color: #E5E7EB !important;
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
/* Chat messages - distinct colors, dark readable text */
|
| 146 |
.message.user {
|
| 147 |
-
background-color: #
|
| 148 |
-
color: #
|
| 149 |
-
|
| 150 |
-
border-radius: 8px !important;
|
| 151 |
-
margin: 8px 0 !important;
|
| 152 |
}
|
| 153 |
|
| 154 |
.message.bot {
|
| 155 |
-
background-color: #
|
| 156 |
-
color: #
|
| 157 |
-
|
| 158 |
-
border-radius: 8px !important;
|
| 159 |
-
margin: 8px 0 !important;
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
.message p {
|
| 163 |
-
color: #1F2937 !important;
|
| 164 |
-
margin: 0 !important;
|
| 165 |
}
|
| 166 |
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
padding: 10px !important;
|
| 173 |
-
border-radius: 6px !important;
|
| 174 |
}
|
| 175 |
|
| 176 |
-
|
| 177 |
-
color: #
|
|
|
|
| 178 |
}
|
| 179 |
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
|
| 184 |
}
|
| 185 |
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
border:
|
| 190 |
-
|
| 191 |
}
|
| 192 |
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
display: flex !important;
|
| 197 |
-
align-items: center !important;
|
| 198 |
-
padding: 8px !important;
|
| 199 |
-
margin: 4px 0 !important;
|
| 200 |
}
|
| 201 |
|
| 202 |
-
input
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
cursor: pointer !important;
|
| 207 |
-
accent-color: #3B82F6 !important;
|
| 208 |
}
|
| 209 |
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
box-shadow:
|
| 213 |
}
|
| 214 |
</style>
|
| 215 |
""")
|
|
|
|
| 79 |
|
| 80 |
with gr.Blocks() as demo:
|
| 81 |
|
| 82 |
+
# Inject custom CSS
|
| 83 |
gr.HTML("""
|
| 84 |
<style>
|
| 85 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
|
|
|
|
| 86 |
|
|
|
|
| 87 |
* {
|
| 88 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
|
| 89 |
}
|
| 90 |
|
|
|
|
| 91 |
.gradio-container {
|
| 92 |
+
background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%) !important;
|
| 93 |
}
|
| 94 |
|
| 95 |
+
.gr-box, .gr-form, .gr-panel {
|
| 96 |
+
background-color: #ffffff !important;
|
| 97 |
+
border-radius: 12px !important;
|
| 98 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
}
|
| 100 |
|
|
|
|
| 101 |
button.primary {
|
| 102 |
+
background-color: #2563eb !important;
|
| 103 |
+
border-color: #2563eb !important;
|
|
|
|
| 104 |
font-weight: 500 !important;
|
| 105 |
+
transition: all 0.2s ease !important;
|
|
|
|
|
|
|
| 106 |
}
|
| 107 |
|
| 108 |
button.primary:hover {
|
| 109 |
+
background-color: #1d4ed8 !important;
|
| 110 |
+
transform: translateY(-1px);
|
| 111 |
+
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
|
| 112 |
}
|
| 113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
.message.user {
|
| 115 |
+
background-color: #f1f3f5 !important;
|
| 116 |
+
color: #1a1a1a !important;
|
| 117 |
+
border-left: 3px solid #2563eb !important;
|
|
|
|
|
|
|
| 118 |
}
|
| 119 |
|
| 120 |
.message.bot {
|
| 121 |
+
background-color: #eff6ff !important;
|
| 122 |
+
color: #1a1a1a !important;
|
| 123 |
+
border-left: 3px solid #60a5fa !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
| 125 |
|
| 126 |
+
h1 {
|
| 127 |
+
color: #1e293b !important;
|
| 128 |
+
text-align: center;
|
| 129 |
+
font-weight: 700 !important;
|
| 130 |
+
letter-spacing: -0.02em;
|
|
|
|
|
|
|
| 131 |
}
|
| 132 |
|
| 133 |
+
h2, h3, h4, h5, h6 {
|
| 134 |
+
color: #334155 !important;
|
| 135 |
+
font-weight: 600 !important;
|
| 136 |
}
|
| 137 |
|
| 138 |
+
.gr-markdown {
|
| 139 |
+
text-align: center;
|
| 140 |
+
color: #475569 !important;
|
|
|
|
| 141 |
}
|
| 142 |
|
| 143 |
+
.gr-radio {
|
| 144 |
+
background-color: #ffffff !important;
|
| 145 |
+
padding: 20px !important;
|
| 146 |
+
border-radius: 12px !important;
|
| 147 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
|
| 148 |
}
|
| 149 |
|
| 150 |
+
label {
|
| 151 |
+
color: #334155 !important;
|
| 152 |
+
font-weight: 600 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
}
|
| 154 |
|
| 155 |
+
.gr-input, .gr-text-input {
|
| 156 |
+
border-radius: 8px !important;
|
| 157 |
+
border: 2px solid #e2e8f0 !important;
|
| 158 |
+
color: #1a1a1a !important;
|
|
|
|
|
|
|
| 159 |
}
|
| 160 |
|
| 161 |
+
.gr-input:focus, .gr-text-input:focus {
|
| 162 |
+
border-color: #2563eb !important;
|
| 163 |
+
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
|
| 164 |
}
|
| 165 |
</style>
|
| 166 |
""")
|