Spaces:
Sleeping
Sleeping
File size: 6,985 Bytes
8893dd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | import gradio as gr
# Custom CSS with Fireworks AI purple palette
CUSTOM_CSS = """
/* Professional container with subtle purple gradient */
.gradio-container {
font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
background: linear-gradient(135deg, #FAFBFC 0%, #F3F0FF 100%);
}
/* Clean chat messages */
.chat-message {
border-radius: 12px;
padding: 16px;
margin: 8px 0;
background: white;
box-shadow: 0 1px 3px rgba(103, 32, 255, 0.08);
border: 1px solid #E6EAF4;
transition: all 0.2s ease;
}
.chat-message:hover {
box-shadow: 0 4px 12px rgba(103, 32, 255, 0.12);
}
/* Professional function calls with purple accent */
.function-call {
background: linear-gradient(to right, #F3F0FF, #FFFFFF);
border-left: 3px solid #6720FF;
padding: 16px;
margin: 12px 0;
border-radius: 8px;
box-shadow: 0 1px 2px rgba(103, 32, 255, 0.06);
font-family: 'JetBrains Mono', monospace;
font-size: 0.9em;
color: #0F172A;
}
/* Sleek meetings panel */
.meetings-container {
background: white;
border-radius: 16px;
padding: 24px;
box-shadow: 0 4px 6px rgba(103, 32, 255, 0.08);
border: 1px solid #E6EAF4;
}
/* Modern accordion with purple accents */
.meeting-details {
border: 1px solid #E6EAF4;
border-radius: 10px;
background: #FFFFFF;
margin: 10px 0;
transition: all 0.25s ease;
overflow: hidden;
}
.meeting-details:hover {
box-shadow: 0 4px 12px rgba(103, 32, 255, 0.1);
border-color: #C4B5FD;
}
.meeting-details[open] {
border-color: #6720FF;
box-shadow: 0 4px 12px rgba(103, 32, 255, 0.15);
}
/* Clean summary styling with purple */
.meeting-summary {
font-weight: 600;
color: #0F172A;
padding: 14px 18px;
cursor: pointer;
background: linear-gradient(90deg, transparent 0%, #F3F0FF 100%);
transition: background 0.2s ease;
}
.meeting-summary:hover {
background: linear-gradient(90deg, #F3F0FF 0%, #EDE9FE 100%);
}
/* Meeting content styling */
.meeting-content {
padding: 16px 18px;
color: #64748B;
border-top: 1px solid #E6EAF4;
background: #FAFBFC;
}
/* Professional content cards */
.content-card {
background: white;
border-radius: 16px;
padding: 28px;
box-shadow: 0 4px 6px rgba(103, 32, 255, 0.06);
border: 1px solid #E6EAF4;
}
/* Purple accent links */
a {
color: #6720FF;
text-decoration: none;
transition: color 0.2s ease;
}
a:hover {
color: #7B2FFF;
text-decoration: underline;
}
/* Custom scrollbar with purple */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #F3F0FF;
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: #C4B5FD;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #A78BFA;
}
/* Search box styling */
.search-box {
border: 2px solid #E6EAF4;
border-radius: 10px;
transition: all 0.2s ease;
}
.search-box:focus {
border-color: #6720FF;
box-shadow: 0 0 0 3px rgba(103, 32, 255, 0.1);
}
/* Header styling */
.header-title {
background: linear-gradient(135deg, #6720FF 0%, #8B5CF6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-weight: 700;
}
/* Chat window styling - readable font size */
.chat-window {
font-size: 0.95em !important;
}
.chat-window .message {
font-size: 0.95em !important;
}
.chat-window .message-content {
font-size: 0.95em !important;
line-height: 1.6;
}
/* Readable text in chat messages */
.chat-window p {
font-size: 0.95em !important;
}
.chat-window code {
font-size: 0.9em !important;
}
.chat-window pre {
font-size: 0.9em !important;
}
/* Slightly smaller tool calling cards */
.chat-window .tool-call {
font-size: 0.92em !important;
}
.chat-window table {
font-size: 0.92em !important;
}
.chat-window th,
.chat-window td {
font-size: 0.92em !important;
padding: 6px 10px !important;
}
/* Proportional headings in chat */
.chat-window h1 {
font-size: 1.5em !important;
}
.chat-window h2 {
font-size: 1.3em !important;
}
.chat-window h3 {
font-size: 1.15em !important;
}
.chat-window h4,
.chat-window h5,
.chat-window h6 {
font-size: 1em !important;
}
/* List items */
.chat-window ul,
.chat-window ol {
font-size: 0.95em !important;
}
.chat-window li {
font-size: 0.95em !important;
}
/* Compact header spacing */
.compact-header {
margin-bottom: 8px !important;
padding: 8px 0 !important;
}
.compact-input {
margin-bottom: 4px !important;
}
.compact-input label {
font-size: 0.9em !important;
margin-bottom: 4px !important;
}
/* Compact example questions */
.compact-examples {
margin: 8px 0 12px 0 !important;
gap: 6px !important;
}
.compact-examples button {
font-size: 0.85em !important;
padding: 6px 10px !important;
min-height: 32px !important;
}
"""
# Create custom Fireworks AI-inspired theme
GRADIO_THEME = gr.themes.Base(
primary_hue=gr.themes.colors.purple,
secondary_hue=gr.themes.colors.violet,
neutral_hue=gr.themes.colors.slate,
spacing_size=gr.themes.sizes.spacing_lg,
radius_size=gr.themes.sizes.radius_md,
text_size=gr.themes.sizes.text_md,
font=[gr.themes.GoogleFont('Inter'), 'ui-sans-serif', 'system-ui', 'sans-serif'],
font_mono=[gr.themes.GoogleFont('JetBrains Mono'), 'monospace']
).set(
# Primary button styling (Fireworks AI purple)
button_primary_background_fill='#6720FF',
button_primary_background_fill_hover='#7B2FFF',
button_primary_text_color='#FFFFFF',
# Secondary button styling
button_secondary_background_fill='#F3F0FF',
button_secondary_background_fill_hover='#EDE9FE',
button_secondary_text_color='#6720FF',
# Interactive elements
slider_color='#6720FF',
# Links
link_text_color='#6720FF',
link_text_color_hover='#7B2FFF',
link_text_color_visited='#8B5CF6',
# Backgrounds
body_background_fill='#FAFBFC',
block_background_fill='#FFFFFF',
input_background_fill='#FFFFFF',
# Borders
border_color_primary='#E6EAF4',
) |