Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,231 +102,268 @@ Please provide a full problem analysis and brainstorming session based on this c
|
|
| 102 |
|
| 103 |
# ββ Custom CSS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 104 |
custom_css = """
|
| 105 |
-
@import url('https://fonts.googleapis.com/css2?family=
|
| 106 |
|
| 107 |
* {
|
| 108 |
-
font-family: '
|
|
|
|
| 109 |
}
|
| 110 |
|
| 111 |
body, .gradio-container {
|
| 112 |
-
background-color: #
|
| 113 |
-
color: #
|
| 114 |
}
|
| 115 |
|
| 116 |
.gradio-container {
|
| 117 |
-
max-width:
|
| 118 |
margin: 0 auto !important;
|
|
|
|
| 119 |
}
|
| 120 |
|
| 121 |
-
/* Header */
|
| 122 |
#app-header {
|
| 123 |
-
padding: 2.
|
| 124 |
-
border-bottom: 1px solid #
|
| 125 |
margin-bottom: 2rem;
|
| 126 |
}
|
| 127 |
|
| 128 |
#app-header h1 {
|
| 129 |
-
font-size: 1.
|
| 130 |
font-weight: 600;
|
| 131 |
-
color: #
|
| 132 |
-
letter-spacing: -0.
|
| 133 |
-
margin: 0 0 0.
|
|
|
|
| 134 |
}
|
| 135 |
|
| 136 |
#app-header p {
|
| 137 |
font-size: 0.875rem;
|
| 138 |
-
color: #
|
| 139 |
margin: 0;
|
| 140 |
-
font-weight:
|
|
|
|
| 141 |
}
|
| 142 |
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
}
|
| 151 |
|
| 152 |
-
/* Section
|
| 153 |
.section-label {
|
| 154 |
font-size: 0.7rem !important;
|
| 155 |
-
font-weight:
|
| 156 |
text-transform: uppercase !important;
|
| 157 |
-
letter-spacing: 0.
|
| 158 |
-
color: #
|
| 159 |
-
margin
|
| 160 |
}
|
| 161 |
|
| 162 |
-
/*
|
| 163 |
-
|
| 164 |
-
background: #
|
| 165 |
-
border: 1px solid #
|
| 166 |
border-radius: 8px !important;
|
| 167 |
-
|
| 168 |
-
}
|
| 169 |
-
|
| 170 |
-
/* Textbox */
|
| 171 |
-
textarea, .gr-textbox textarea {
|
| 172 |
-
background: #0d1117 !important;
|
| 173 |
-
border: 1px solid #1e2d3d !important;
|
| 174 |
-
border-radius: 6px !important;
|
| 175 |
-
color: #cbd5e1 !important;
|
| 176 |
font-size: 0.875rem !important;
|
| 177 |
-
line-height: 1.
|
| 178 |
-
|
| 179 |
-
padding: 0.875rem !important;
|
| 180 |
resize: vertical !important;
|
|
|
|
| 181 |
}
|
| 182 |
|
| 183 |
textarea:focus {
|
| 184 |
-
border-color: #
|
| 185 |
outline: none !important;
|
| 186 |
-
box-shadow: 0 0 0 3px rgba(
|
|
|
|
| 187 |
}
|
| 188 |
|
| 189 |
textarea::placeholder {
|
| 190 |
-
color: #
|
| 191 |
}
|
| 192 |
|
| 193 |
-
/* File upload */
|
| 194 |
-
.gr-file
|
| 195 |
-
background: #
|
| 196 |
-
border: 1px dashed #
|
| 197 |
-
border-radius:
|
| 198 |
-
color: #
|
| 199 |
}
|
| 200 |
|
| 201 |
-
/* Tabs */
|
| 202 |
.tab-nav {
|
| 203 |
-
border-bottom: 1px solid #
|
| 204 |
margin-bottom: 1rem !important;
|
|
|
|
| 205 |
}
|
| 206 |
|
| 207 |
.tab-nav button {
|
| 208 |
font-size: 0.8rem !important;
|
| 209 |
font-weight: 500 !important;
|
| 210 |
-
color: #
|
| 211 |
border: none !important;
|
| 212 |
background: transparent !important;
|
| 213 |
-
padding: 0.5rem 1rem !important;
|
| 214 |
border-radius: 0 !important;
|
| 215 |
-
letter-spacing: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
}
|
| 217 |
|
| 218 |
.tab-nav button.selected {
|
| 219 |
-
color: #
|
| 220 |
-
border-bottom: 2px solid #
|
|
|
|
| 221 |
}
|
| 222 |
|
| 223 |
-
/* Run button */
|
| 224 |
#run-btn {
|
| 225 |
-
background: #
|
| 226 |
-
color: #
|
| 227 |
border: none !important;
|
| 228 |
-
border-radius:
|
| 229 |
font-size: 0.875rem !important;
|
| 230 |
font-weight: 600 !important;
|
| 231 |
-
padding: 0.7rem 1.
|
| 232 |
letter-spacing: 0.01em !important;
|
| 233 |
-
transition: background 0.15s ease !important;
|
| 234 |
-
margin-top: 0.
|
| 235 |
width: 100% !important;
|
|
|
|
| 236 |
}
|
| 237 |
|
| 238 |
#run-btn:hover {
|
| 239 |
-
background: #
|
|
|
|
| 240 |
}
|
| 241 |
|
| 242 |
-
/* Output
|
| 243 |
#output-area {
|
| 244 |
-
background: #
|
| 245 |
-
border: 1px solid #
|
| 246 |
-
border-radius:
|
| 247 |
-
padding: 1.25rem !important;
|
| 248 |
-
min-height:
|
| 249 |
font-size: 0.875rem !important;
|
| 250 |
line-height: 1.8 !important;
|
| 251 |
-
color: #
|
| 252 |
}
|
| 253 |
|
| 254 |
#output-area h1, #output-area h2, #output-area h3 {
|
| 255 |
-
color: #
|
| 256 |
font-weight: 600 !important;
|
| 257 |
-
letter-spacing: -0.
|
| 258 |
-
margin-top: 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
}
|
| 260 |
|
| 261 |
#output-area strong {
|
| 262 |
-
color: #
|
| 263 |
-
font-weight:
|
| 264 |
}
|
| 265 |
|
| 266 |
#output-area ul, #output-area ol {
|
| 267 |
padding-left: 1.25rem !important;
|
| 268 |
-
color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
}
|
| 270 |
|
| 271 |
-
#output-area
|
| 272 |
-
|
| 273 |
-
border-radius: 3px !important;
|
| 274 |
-
padding: 0.1em 0.35em !important;
|
| 275 |
-
font-family: 'JetBrains Mono', monospace !important;
|
| 276 |
-
font-size: 0.82em !important;
|
| 277 |
-
color: #38bdf8 !important;
|
| 278 |
}
|
| 279 |
|
| 280 |
-
/* Accordion */
|
| 281 |
.gr-accordion {
|
| 282 |
-
background: #
|
| 283 |
-
border: 1px solid #
|
| 284 |
-
border-radius:
|
| 285 |
-
margin-top: 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
}
|
| 287 |
|
| 288 |
-
|
|
|
|
|
|
|
| 289 |
font-size: 0.8rem !important;
|
| 290 |
-
color: #475569 !important;
|
| 291 |
font-weight: 500 !important;
|
| 292 |
}
|
| 293 |
|
| 294 |
-
/* Examples */
|
| 295 |
.gr-examples {
|
| 296 |
-
margin-top:
|
| 297 |
}
|
| 298 |
|
| 299 |
.gr-examples table {
|
| 300 |
-
background: #
|
| 301 |
-
border: 1px solid #
|
| 302 |
-
border-radius:
|
|
|
|
| 303 |
}
|
| 304 |
|
| 305 |
.gr-examples td {
|
| 306 |
-
color: #
|
| 307 |
font-size: 0.8rem !important;
|
|
|
|
|
|
|
| 308 |
}
|
| 309 |
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
border-top: 1px solid #1e2d3d !important;
|
| 314 |
-
margin: 1.5rem 0 !important;
|
| 315 |
}
|
| 316 |
|
| 317 |
-
/*
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
letter-spacing: 0.03em !important;
|
| 323 |
}
|
| 324 |
|
| 325 |
-
/* Scrollbar */
|
| 326 |
::-webkit-scrollbar { width: 5px; }
|
| 327 |
-
::-webkit-scrollbar-track { background: #
|
| 328 |
-
::-webkit-scrollbar-thumb { background: #
|
| 329 |
-
::-webkit-scrollbar-thumb:hover { background: #
|
| 330 |
"""
|
| 331 |
|
| 332 |
# ββ Gradio UI βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
@@ -337,7 +374,7 @@ with gr.Blocks(
|
|
| 337 |
|
| 338 |
gr.HTML("""
|
| 339 |
<div id="app-header">
|
| 340 |
-
<div id="
|
| 341 |
<h1>Problem Brainstormer</h1>
|
| 342 |
<p>Paste a meeting transcript or upload a document to get structured problem analysis and solution ideas.</p>
|
| 343 |
</div>
|
|
@@ -362,7 +399,7 @@ with gr.Blocks(
|
|
| 362 |
file_types=[".pdf"],
|
| 363 |
file_count="single",
|
| 364 |
)
|
| 365 |
-
gr.HTML('<p style="font-size:0.75rem;color:#
|
| 366 |
|
| 367 |
run_btn = gr.Button(
|
| 368 |
"Analyze and Brainstorm",
|
|
|
|
| 102 |
|
| 103 |
# ββ Custom CSS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 104 |
custom_css = """
|
| 105 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
|
| 106 |
|
| 107 |
* {
|
| 108 |
+
font-family: 'Inter', sans-serif !important;
|
| 109 |
+
box-sizing: border-box;
|
| 110 |
}
|
| 111 |
|
| 112 |
body, .gradio-container {
|
| 113 |
+
background-color: #ffffff !important;
|
| 114 |
+
color: #111827 !important;
|
| 115 |
}
|
| 116 |
|
| 117 |
.gradio-container {
|
| 118 |
+
max-width: 1280px !important;
|
| 119 |
margin: 0 auto !important;
|
| 120 |
+
padding: 0 2rem !important;
|
| 121 |
}
|
| 122 |
|
| 123 |
+
/* ββ Header ββ */
|
| 124 |
#app-header {
|
| 125 |
+
padding: 2.75rem 0 2rem;
|
| 126 |
+
border-bottom: 1px solid #e5e7eb;
|
| 127 |
margin-bottom: 2rem;
|
| 128 |
}
|
| 129 |
|
| 130 |
#app-header h1 {
|
| 131 |
+
font-size: 1.5rem;
|
| 132 |
font-weight: 600;
|
| 133 |
+
color: #111827;
|
| 134 |
+
letter-spacing: -0.025em;
|
| 135 |
+
margin: 0 0 0.35rem 0;
|
| 136 |
+
line-height: 1.3;
|
| 137 |
}
|
| 138 |
|
| 139 |
#app-header p {
|
| 140 |
font-size: 0.875rem;
|
| 141 |
+
color: #6b7280;
|
| 142 |
margin: 0;
|
| 143 |
+
font-weight: 400;
|
| 144 |
+
line-height: 1.5;
|
| 145 |
}
|
| 146 |
|
| 147 |
+
#header-tag {
|
| 148 |
+
display: inline-block;
|
| 149 |
+
font-size: 0.7rem;
|
| 150 |
+
font-weight: 600;
|
| 151 |
+
letter-spacing: 0.1em;
|
| 152 |
+
text-transform: uppercase;
|
| 153 |
+
color: #2563eb;
|
| 154 |
+
background: #eff6ff;
|
| 155 |
+
border: 1px solid #bfdbfe;
|
| 156 |
+
border-radius: 4px;
|
| 157 |
+
padding: 0.2rem 0.6rem;
|
| 158 |
+
margin-bottom: 0.85rem;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
/* ββ Panels ββ */
|
| 162 |
+
.input-panel, .output-panel {
|
| 163 |
+
background: #ffffff !important;
|
| 164 |
+
border: 1px solid #e5e7eb !important;
|
| 165 |
+
border-radius: 10px !important;
|
| 166 |
+
padding: 1.5rem !important;
|
| 167 |
}
|
| 168 |
|
| 169 |
+
/* ββ Section label ββ */
|
| 170 |
.section-label {
|
| 171 |
font-size: 0.7rem !important;
|
| 172 |
+
font-weight: 600 !important;
|
| 173 |
text-transform: uppercase !important;
|
| 174 |
+
letter-spacing: 0.1em !important;
|
| 175 |
+
color: #9ca3af !important;
|
| 176 |
+
margin: 0 0 1rem 0 !important;
|
| 177 |
}
|
| 178 |
|
| 179 |
+
/* ββ Textarea ββ */
|
| 180 |
+
textarea {
|
| 181 |
+
background: #f9fafb !important;
|
| 182 |
+
border: 1px solid #e5e7eb !important;
|
| 183 |
border-radius: 8px !important;
|
| 184 |
+
color: #111827 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
font-size: 0.875rem !important;
|
| 186 |
+
line-height: 1.75 !important;
|
| 187 |
+
padding: 0.875rem 1rem !important;
|
|
|
|
| 188 |
resize: vertical !important;
|
| 189 |
+
transition: border-color 0.15s, box-shadow 0.15s !important;
|
| 190 |
}
|
| 191 |
|
| 192 |
textarea:focus {
|
| 193 |
+
border-color: #2563eb !important;
|
| 194 |
outline: none !important;
|
| 195 |
+
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08) !important;
|
| 196 |
+
background: #ffffff !important;
|
| 197 |
}
|
| 198 |
|
| 199 |
textarea::placeholder {
|
| 200 |
+
color: #d1d5db !important;
|
| 201 |
}
|
| 202 |
|
| 203 |
+
/* ββ File upload ββ */
|
| 204 |
+
.gr-file {
|
| 205 |
+
background: #f9fafb !important;
|
| 206 |
+
border: 1px dashed #d1d5db !important;
|
| 207 |
+
border-radius: 8px !important;
|
| 208 |
+
color: #6b7280 !important;
|
| 209 |
}
|
| 210 |
|
| 211 |
+
/* ββ Tabs ββ */
|
| 212 |
.tab-nav {
|
| 213 |
+
border-bottom: 1px solid #e5e7eb !important;
|
| 214 |
margin-bottom: 1rem !important;
|
| 215 |
+
background: transparent !important;
|
| 216 |
}
|
| 217 |
|
| 218 |
.tab-nav button {
|
| 219 |
font-size: 0.8rem !important;
|
| 220 |
font-weight: 500 !important;
|
| 221 |
+
color: #9ca3af !important;
|
| 222 |
border: none !important;
|
| 223 |
background: transparent !important;
|
| 224 |
+
padding: 0.5rem 1rem 0.6rem !important;
|
| 225 |
border-radius: 0 !important;
|
| 226 |
+
letter-spacing: 0.01em !important;
|
| 227 |
+
transition: color 0.15s !important;
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
.tab-nav button:hover {
|
| 231 |
+
color: #374151 !important;
|
| 232 |
}
|
| 233 |
|
| 234 |
.tab-nav button.selected {
|
| 235 |
+
color: #2563eb !important;
|
| 236 |
+
border-bottom: 2px solid #2563eb !important;
|
| 237 |
+
font-weight: 600 !important;
|
| 238 |
}
|
| 239 |
|
| 240 |
+
/* ββ Run button ββ */
|
| 241 |
#run-btn {
|
| 242 |
+
background: #2563eb !important;
|
| 243 |
+
color: #ffffff !important;
|
| 244 |
border: none !important;
|
| 245 |
+
border-radius: 8px !important;
|
| 246 |
font-size: 0.875rem !important;
|
| 247 |
font-weight: 600 !important;
|
| 248 |
+
padding: 0.7rem 1.5rem !important;
|
| 249 |
letter-spacing: 0.01em !important;
|
| 250 |
+
transition: background 0.15s ease, box-shadow 0.15s ease !important;
|
| 251 |
+
margin-top: 0.875rem !important;
|
| 252 |
width: 100% !important;
|
| 253 |
+
cursor: pointer !important;
|
| 254 |
}
|
| 255 |
|
| 256 |
#run-btn:hover {
|
| 257 |
+
background: #1d4ed8 !important;
|
| 258 |
+
box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
|
| 259 |
}
|
| 260 |
|
| 261 |
+
/* ββ Output area ββ */
|
| 262 |
#output-area {
|
| 263 |
+
background: #f9fafb !important;
|
| 264 |
+
border: 1px solid #e5e7eb !important;
|
| 265 |
+
border-radius: 8px !important;
|
| 266 |
+
padding: 1.25rem 1.5rem !important;
|
| 267 |
+
min-height: 420px !important;
|
| 268 |
font-size: 0.875rem !important;
|
| 269 |
line-height: 1.8 !important;
|
| 270 |
+
color: #374151 !important;
|
| 271 |
}
|
| 272 |
|
| 273 |
#output-area h1, #output-area h2, #output-area h3 {
|
| 274 |
+
color: #111827 !important;
|
| 275 |
font-weight: 600 !important;
|
| 276 |
+
letter-spacing: -0.015em !important;
|
| 277 |
+
margin-top: 1.5rem !important;
|
| 278 |
+
margin-bottom: 0.5rem !important;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
#output-area h2 {
|
| 282 |
+
font-size: 1rem !important;
|
| 283 |
+
border-bottom: 1px solid #f3f4f6 !important;
|
| 284 |
+
padding-bottom: 0.4rem !important;
|
| 285 |
}
|
| 286 |
|
| 287 |
#output-area strong {
|
| 288 |
+
color: #111827 !important;
|
| 289 |
+
font-weight: 600 !important;
|
| 290 |
}
|
| 291 |
|
| 292 |
#output-area ul, #output-area ol {
|
| 293 |
padding-left: 1.25rem !important;
|
| 294 |
+
color: #4b5563 !important;
|
| 295 |
+
margin: 0.4rem 0 !important;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
#output-area li {
|
| 299 |
+
margin-bottom: 0.25rem !important;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
#output-area p {
|
| 303 |
+
color: #4b5563 !important;
|
| 304 |
}
|
| 305 |
|
| 306 |
+
#output-area em {
|
| 307 |
+
color: #9ca3af !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
}
|
| 309 |
|
| 310 |
+
/* ββ Accordion ββ */
|
| 311 |
.gr-accordion {
|
| 312 |
+
background: #f9fafb !important;
|
| 313 |
+
border: 1px solid #e5e7eb !important;
|
| 314 |
+
border-radius: 8px !important;
|
| 315 |
+
margin-top: 0.875rem !important;
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
.gr-accordion .label-wrap span {
|
| 319 |
+
font-size: 0.8rem !important;
|
| 320 |
+
color: #6b7280 !important;
|
| 321 |
+
font-weight: 500 !important;
|
| 322 |
}
|
| 323 |
|
| 324 |
+
/* ββ Labels ββ */
|
| 325 |
+
label, .gr-label {
|
| 326 |
+
color: #6b7280 !important;
|
| 327 |
font-size: 0.8rem !important;
|
|
|
|
| 328 |
font-weight: 500 !important;
|
| 329 |
}
|
| 330 |
|
| 331 |
+
/* ββ Examples ββ */
|
| 332 |
.gr-examples {
|
| 333 |
+
margin-top: 1rem !important;
|
| 334 |
}
|
| 335 |
|
| 336 |
.gr-examples table {
|
| 337 |
+
background: #ffffff !important;
|
| 338 |
+
border: 1px solid #e5e7eb !important;
|
| 339 |
+
border-radius: 8px !important;
|
| 340 |
+
overflow: hidden !important;
|
| 341 |
}
|
| 342 |
|
| 343 |
.gr-examples td {
|
| 344 |
+
color: #6b7280 !important;
|
| 345 |
font-size: 0.8rem !important;
|
| 346 |
+
padding: 0.6rem 1rem !important;
|
| 347 |
+
border-bottom: 1px solid #f3f4f6 !important;
|
| 348 |
}
|
| 349 |
|
| 350 |
+
.gr-examples tr:hover td {
|
| 351 |
+
background: #f9fafb !important;
|
| 352 |
+
cursor: pointer !important;
|
|
|
|
|
|
|
| 353 |
}
|
| 354 |
|
| 355 |
+
/* ββ Divider ββ */
|
| 356 |
+
.divider {
|
| 357 |
+
border: none !important;
|
| 358 |
+
border-top: 1px solid #e5e7eb !important;
|
| 359 |
+
margin: 2rem 0 1.5rem !important;
|
|
|
|
| 360 |
}
|
| 361 |
|
| 362 |
+
/* ββ Scrollbar ββ */
|
| 363 |
::-webkit-scrollbar { width: 5px; }
|
| 364 |
+
::-webkit-scrollbar-track { background: #f9fafb; }
|
| 365 |
+
::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }
|
| 366 |
+
::-webkit-scrollbar-thumb:hover { background: #d1d5db; }
|
| 367 |
"""
|
| 368 |
|
| 369 |
# ββ Gradio UI βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 374 |
|
| 375 |
gr.HTML("""
|
| 376 |
<div id="app-header">
|
| 377 |
+
<div id="header-tag">Intern Tool</div>
|
| 378 |
<h1>Problem Brainstormer</h1>
|
| 379 |
<p>Paste a meeting transcript or upload a document to get structured problem analysis and solution ideas.</p>
|
| 380 |
</div>
|
|
|
|
| 399 |
file_types=[".pdf"],
|
| 400 |
file_count="single",
|
| 401 |
)
|
| 402 |
+
gr.HTML('<p style="font-size:0.75rem;color:#9ca3af;margin-top:0.5rem">Text-based PDFs only. Scanned documents are not supported.</p>')
|
| 403 |
|
| 404 |
run_btn = gr.Button(
|
| 405 |
"Analyze and Brainstorm",
|