Davichick commited on
Commit
a37c2c3
Β·
verified Β·
1 Parent(s): 20e65df

fix: neutral icon for none-identified, larger fonts, bigger label, grey separator

Browse files
Files changed (1) hide show
  1. app.py +33 -6
app.py CHANGED
@@ -106,13 +106,25 @@ def format_feedback_html(raw_text: str) -> str:
106
  out.append('<div style="border-top:1px solid #21262d;margin-top:16px;padding-top:12px;"><p style="font-weight:600;font-size:0.78em;color:#6b7280;text-transform:uppercase;letter-spacing:0.08em;margin:0 0 8px 0;">πŸ’‘ Example Answer</p>')
107
  elif s.startswith('- ') or s.startswith('* '):
108
  content = html_mod.escape(s[2:])
109
- if section == 'pros':
 
 
 
 
 
 
 
 
 
110
  icon = '<span style="min-width:20px;height:20px;border-radius:50%;background:#1a4731;color:#3fb950;display:inline-flex;align-items:center;justify-content:center;font-size:0.65em;font-weight:900;flex-shrink:0;">βœ“</span>'
 
111
  elif section == 'cons':
112
  icon = '<span style="min-width:20px;height:20px;border-radius:50%;background:#3d1212;color:#f85149;display:inline-flex;align-items:center;justify-content:center;font-size:0.65em;font-weight:900;flex-shrink:0;">βœ•</span>'
 
113
  else:
114
  icon = ''
115
- out.append(f'<div style="display:flex;align-items:flex-start;gap:10px;margin-bottom:8px;"><div style="margin-top:2px;">{icon}</div><span style="font-size:0.88em;color:#8b949e;line-height:1.5;">{content}</span></div>')
 
116
  elif section == 'example':
117
  out.append(f'<p style="font-size:0.88em;color:#8b949e;line-height:1.6;margin:0;">{html_mod.escape(s)}</p>')
118
  if section == 'example':
@@ -371,9 +383,9 @@ textarea:focus, input:focus {
371
  box-shadow: 0 0 0 3px rgba(20,184,166,0.12) !important;
372
  }
373
 
374
- /* Question display β€” make text bold and large */
375
  #q-display textarea {
376
- font-size: 1.2em !important;
377
  font-weight: 700 !important;
378
  color: #e6edf3 !important;
379
  background: transparent !important;
@@ -385,10 +397,25 @@ textarea:focus, input:focus {
385
  }
386
  #q-display label span {
387
  color: #14b8a6 !important;
388
- font-size: 0.72em !important;
389
  font-weight: 700 !important;
390
- letter-spacing: 0.12em !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  }
 
 
392
 
393
  /* ── Dropdown open menu ───────────────────────────── */
394
  .options, .options-wrap, [role="listbox"], ul.options {
 
106
  out.append('<div style="border-top:1px solid #21262d;margin-top:16px;padding-top:12px;"><p style="font-weight:600;font-size:0.78em;color:#6b7280;text-transform:uppercase;letter-spacing:0.08em;margin:0 0 8px 0;">πŸ’‘ Example Answer</p>')
107
  elif s.startswith('- ') or s.startswith('* '):
108
  content = html_mod.escape(s[2:])
109
+ # Detect "none identified" type entries β€” show neutral grey icon
110
+ is_empty = content.strip().lower() in (
111
+ 'none identified', 'none', 'n/a', 'none.', 'none identified.',
112
+ 'none at this time', 'no cons identified', 'no pros identified',
113
+ 'not applicable'
114
+ )
115
+ if is_empty:
116
+ icon = '<span style="min-width:20px;height:20px;border-radius:50%;background:#2d333b;color:#6b7280;display:inline-flex;align-items:center;justify-content:center;font-size:0.65em;font-weight:900;flex-shrink:0;">β€”</span>'
117
+ text_color = '#6b7280'
118
+ elif section == 'pros':
119
  icon = '<span style="min-width:20px;height:20px;border-radius:50%;background:#1a4731;color:#3fb950;display:inline-flex;align-items:center;justify-content:center;font-size:0.65em;font-weight:900;flex-shrink:0;">βœ“</span>'
120
+ text_color = '#8b949e'
121
  elif section == 'cons':
122
  icon = '<span style="min-width:20px;height:20px;border-radius:50%;background:#3d1212;color:#f85149;display:inline-flex;align-items:center;justify-content:center;font-size:0.65em;font-weight:900;flex-shrink:0;">βœ•</span>'
123
+ text_color = '#8b949e'
124
  else:
125
  icon = ''
126
+ text_color = '#8b949e'
127
+ out.append(f'<div style="display:flex;align-items:flex-start;gap:10px;margin-bottom:8px;"><div style="margin-top:2px;">{icon}</div><span style="font-size:0.88em;color:{text_color};line-height:1.5;font-style:{"italic" if is_empty else "normal"}">{content}</span></div>')
128
  elif section == 'example':
129
  out.append(f'<p style="font-size:0.88em;color:#8b949e;line-height:1.6;margin:0;">{html_mod.escape(s)}</p>')
130
  if section == 'example':
 
383
  box-shadow: 0 0 0 3px rgba(20,184,166,0.12) !important;
384
  }
385
 
386
+ /* Question display β€” bold large text, teal label */
387
  #q-display textarea {
388
+ font-size: 1.35em !important;
389
  font-weight: 700 !important;
390
  color: #e6edf3 !important;
391
  background: transparent !important;
 
397
  }
398
  #q-display label span {
399
  color: #14b8a6 !important;
400
+ font-size: 0.85em !important;
401
  font-weight: 700 !important;
402
+ letter-spacing: 0.1em !important;
403
+ text-transform: uppercase !important;
404
+ margin-bottom: 10px !important;
405
+ }
406
+
407
+ /* Answer textarea β€” larger font */
408
+ #a-input textarea {
409
+ font-size: 1.05em !important;
410
+ line-height: 1.65 !important;
411
+ }
412
+
413
+ /* Separator between question and answer β€” subtle grey */
414
+ #q-display + div, .gradio-group hr, .group-separator {
415
+ border-color: #21262d !important;
416
  }
417
+ /* Gradio adds a border-top between stacked items inside a Group */
418
+ #a-input { border-top: 1px solid #21262d !important; padding-top: 16px !important; }
419
 
420
  /* ── Dropdown open menu ───────────────────────────── */
421
  .options, .options-wrap, [role="listbox"], ul.options {