banao-tech commited on
Commit
08ad3c7
Β·
verified Β·
1 Parent(s): 5c0475d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +153 -116
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=Sora:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
106
 
107
  * {
108
- font-family: 'Sora', sans-serif !important;
 
109
  }
110
 
111
  body, .gradio-container {
112
- background-color: #0d1117 !important;
113
- color: #e2e8f0 !important;
114
  }
115
 
116
  .gradio-container {
117
- max-width: 1200px !important;
118
  margin: 0 auto !important;
 
119
  }
120
 
121
- /* Header */
122
  #app-header {
123
- padding: 2.5rem 0 1.5rem;
124
- border-bottom: 1px solid #1e2d3d;
125
  margin-bottom: 2rem;
126
  }
127
 
128
  #app-header h1 {
129
- font-size: 1.6rem;
130
  font-weight: 600;
131
- color: #e2e8f0;
132
- letter-spacing: -0.02em;
133
- margin: 0 0 0.3rem 0;
 
134
  }
135
 
136
  #app-header p {
137
  font-size: 0.875rem;
138
- color: #64748b;
139
  margin: 0;
140
- font-weight: 300;
 
141
  }
142
 
143
- /* Accent bar */
144
- #accent-bar {
145
- width: 2.5rem;
146
- height: 2px;
147
- background: linear-gradient(90deg, #0ea5e9, #38bdf8);
148
- margin-bottom: 0.75rem;
149
- border-radius: 2px;
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
151
 
152
- /* Section labels */
153
  .section-label {
154
  font-size: 0.7rem !important;
155
- font-weight: 500 !important;
156
  text-transform: uppercase !important;
157
- letter-spacing: 0.12em !important;
158
- color: #475569 !important;
159
- margin-bottom: 0.75rem !important;
160
  }
161
 
162
- /* Input panels */
163
- .input-panel, .output-panel {
164
- background: #111827 !important;
165
- border: 1px solid #1e2d3d !important;
166
  border-radius: 8px !important;
167
- padding: 1.25rem !important;
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.7 !important;
178
- font-family: 'JetBrains Mono', monospace !important;
179
- padding: 0.875rem !important;
180
  resize: vertical !important;
 
181
  }
182
 
183
  textarea:focus {
184
- border-color: #0ea5e9 !important;
185
  outline: none !important;
186
- box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.08) !important;
 
187
  }
188
 
189
  textarea::placeholder {
190
- color: #334155 !important;
191
  }
192
 
193
- /* File upload */
194
- .gr-file, .upload-button {
195
- background: #0d1117 !important;
196
- border: 1px dashed #1e2d3d !important;
197
- border-radius: 6px !important;
198
- color: #64748b !important;
199
  }
200
 
201
- /* Tabs */
202
  .tab-nav {
203
- border-bottom: 1px solid #1e2d3d !important;
204
  margin-bottom: 1rem !important;
 
205
  }
206
 
207
  .tab-nav button {
208
  font-size: 0.8rem !important;
209
  font-weight: 500 !important;
210
- color: #475569 !important;
211
  border: none !important;
212
  background: transparent !important;
213
- padding: 0.5rem 1rem !important;
214
  border-radius: 0 !important;
215
- letter-spacing: 0.02em !important;
 
 
 
 
 
216
  }
217
 
218
  .tab-nav button.selected {
219
- color: #0ea5e9 !important;
220
- border-bottom: 2px solid #0ea5e9 !important;
 
221
  }
222
 
223
- /* Run button */
224
  #run-btn {
225
- background: #0ea5e9 !important;
226
- color: #0d1117 !important;
227
  border: none !important;
228
- border-radius: 6px !important;
229
  font-size: 0.875rem !important;
230
  font-weight: 600 !important;
231
- padding: 0.7rem 1.75rem !important;
232
  letter-spacing: 0.01em !important;
233
- transition: background 0.15s ease !important;
234
- margin-top: 0.75rem !important;
235
  width: 100% !important;
 
236
  }
237
 
238
  #run-btn:hover {
239
- background: #38bdf8 !important;
 
240
  }
241
 
242
- /* Output markdown */
243
  #output-area {
244
- background: #0d1117 !important;
245
- border: 1px solid #1e2d3d !important;
246
- border-radius: 6px !important;
247
- padding: 1.25rem !important;
248
- min-height: 400px !important;
249
  font-size: 0.875rem !important;
250
  line-height: 1.8 !important;
251
- color: #cbd5e1 !important;
252
  }
253
 
254
  #output-area h1, #output-area h2, #output-area h3 {
255
- color: #e2e8f0 !important;
256
  font-weight: 600 !important;
257
- letter-spacing: -0.01em !important;
258
- margin-top: 1.25rem !important;
 
 
 
 
 
 
 
259
  }
260
 
261
  #output-area strong {
262
- color: #0ea5e9 !important;
263
- font-weight: 500 !important;
264
  }
265
 
266
  #output-area ul, #output-area ol {
267
  padding-left: 1.25rem !important;
268
- color: #94a3b8 !important;
 
 
 
 
 
 
 
 
 
269
  }
270
 
271
- #output-area code {
272
- background: #1e2d3d !important;
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: #111827 !important;
283
- border: 1px solid #1e2d3d !important;
284
- border-radius: 6px !important;
285
- margin-top: 0.75rem !important;
 
 
 
 
 
 
286
  }
287
 
288
- .gr-accordion .label-wrap {
 
 
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: 1.5rem !important;
297
  }
298
 
299
  .gr-examples table {
300
- background: #111827 !important;
301
- border: 1px solid #1e2d3d !important;
302
- border-radius: 6px !important;
 
303
  }
304
 
305
  .gr-examples td {
306
- color: #64748b !important;
307
  font-size: 0.8rem !important;
 
 
308
  }
309
 
310
- /* Divider */
311
- .divider {
312
- border: none !important;
313
- border-top: 1px solid #1e2d3d !important;
314
- margin: 1.5rem 0 !important;
315
  }
316
 
317
- /* Labels */
318
- label, .gr-label {
319
- color: #475569 !important;
320
- font-size: 0.8rem !important;
321
- font-weight: 500 !important;
322
- letter-spacing: 0.03em !important;
323
  }
324
 
325
- /* Scrollbar */
326
  ::-webkit-scrollbar { width: 5px; }
327
- ::-webkit-scrollbar-track { background: #0d1117; }
328
- ::-webkit-scrollbar-thumb { background: #1e2d3d; border-radius: 3px; }
329
- ::-webkit-scrollbar-thumb:hover { background: #0ea5e9; }
330
  """
331
 
332
  # ── Gradio UI ─────────────────────────────────────────────────────────────────
@@ -337,7 +374,7 @@ with gr.Blocks(
337
 
338
  gr.HTML("""
339
  <div id="app-header">
340
- <div id="accent-bar"></div>
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:#334155;margin-top:0.5rem">Text-based PDFs only. Scanned documents are not supported.</p>')
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",