Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -396,7 +396,21 @@ body, .gradio-container {
|
|
| 396 |
font-family: var(--font-sans) !important;
|
| 397 |
color: var(--text-body) !important;
|
| 398 |
}
|
| 399 |
-
.gradio-container {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
footer { visibility: hidden; }
|
| 401 |
.cc-meta { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .04em; color: var(--text-muted); }
|
| 402 |
|
|
@@ -426,10 +440,15 @@ button[role="tab"][aria-selected="true"] { color: var(--fire-600) !important;
|
|
| 426 |
padding: 18px !important; gap: 12px !important;
|
| 427 |
}
|
| 428 |
.cc-brief .block, .cc-brief .form { background: transparent !important; border: none !important; box-shadow: none !important; }
|
| 429 |
-
|
|
|
|
| 430 |
font-family: var(--font-sans) !important; font-weight: 700 !important;
|
| 431 |
font-size: 0.875rem !important; color: var(--fire-600) !important;
|
| 432 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
.cc-brief textarea, .cc-brief input[type="text"], .cc-brief .dropdown input, .cc-brief .wrap-inner {
|
| 434 |
font-family: var(--font-sans) !important; font-size: 1rem !important; color: var(--text-strong) !important;
|
| 435 |
background: var(--surface-raised) !important;
|
|
@@ -445,11 +464,12 @@ button.cc-btn {
|
|
| 445 |
font-family: var(--font-sans) !important; font-weight: 800 !important; font-size: 1rem !important;
|
| 446 |
line-height: 1 !important; color: #fff !important;
|
| 447 |
background: var(--primary) !important; border: none !important; border-radius: var(--radius-md) !important;
|
| 448 |
-
padding: 14px 24px !important;
|
| 449 |
box-shadow: 0 var(--tactile-depth) 0 var(--primary-edge), 0 9px 10px rgba(39,26,15,.20) !important;
|
| 450 |
transform: translateY(0); transition: transform var(--dur-fast) var(--ease-out),
|
| 451 |
box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
|
| 452 |
}
|
|
|
|
| 453 |
button.cc-btn:hover { background: var(--primary-hover) !important; }
|
| 454 |
button.cc-btn:active { transform: translateY(4px);
|
| 455 |
box-shadow: 0 1px 0 var(--primary-edge), 0 2px 4px rgba(39,26,15,.18) !important; }
|
|
@@ -580,18 +600,19 @@ with gr.Blocks(theme=gr.themes.Base(), css=CSS, head=FONTS_HEAD, title="⛺ Copy
|
|
| 580 |
gr.HTML('<div class="cc-kicker cc-kicker--fire">'
|
| 581 |
'<span class="cc-kicker__rule"></span><span>The brief</span>'
|
| 582 |
'<span class="cc-kicker__rule"></span></div>')
|
| 583 |
-
with gr.Row():
|
| 584 |
-
current_in = gr.Textbox(label="UI copy on trial", scale=3, lines=
|
| 585 |
placeholder="Paste a button label, error message, empty state…")
|
| 586 |
with gr.Column(scale=2):
|
| 587 |
category_in = gr.Dropdown(CATEGORIES, value="button", label="Content type")
|
| 588 |
surface_in = gr.Textbox(label="Where it lives (optional)",
|
| 589 |
-
placeholder="e.g. checkout, settings page
|
|
|
|
|
|
|
| 590 |
with gr.Row():
|
| 591 |
-
battle_btn = gr.Button("🔥 Light the fire", elem_classes="cc-btn", scale=
|
| 592 |
-
smore_btn = gr.Button("🍫 S'more examples", elem_classes="cc-btn-secondary",
|
| 593 |
-
|
| 594 |
-
label="🔦 Lantern mode — show their thinking (slower)")
|
| 595 |
status_md = gr.HTML("")
|
| 596 |
with gr.Row():
|
| 597 |
card_a = gr.HTML()
|
|
|
|
| 396 |
font-family: var(--font-sans) !important;
|
| 397 |
color: var(--text-body) !important;
|
| 398 |
}
|
| 399 |
+
.gradio-container {
|
| 400 |
+
max-width: 1080px !important; margin: 0 auto !important;
|
| 401 |
+
/* Re-point Gradio's own theme tokens at the design system (fixes blue checkbox,
|
| 402 |
+
off-brand tab underline, and focus rings at the source). */
|
| 403 |
+
--color-accent: var(--fire-500) !important;
|
| 404 |
+
--color-accent-soft: var(--fire-100) !important;
|
| 405 |
+
--checkbox-background-color-selected: var(--fire-500) !important;
|
| 406 |
+
--checkbox-border-color-selected: var(--fire-500) !important;
|
| 407 |
+
--checkbox-border-color-focus: var(--fire-400) !important;
|
| 408 |
+
--checkbox-border-color: var(--bark-600) !important;
|
| 409 |
+
--input-border-color-focus: var(--fire-500) !important;
|
| 410 |
+
--body-text-color: var(--bark-800) !important;
|
| 411 |
+
--block-label-text-color: var(--fire-600) !important;
|
| 412 |
+
--loader-color: var(--fire-500) !important;
|
| 413 |
+
}
|
| 414 |
footer { visibility: hidden; }
|
| 415 |
.cc-meta { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: .04em; color: var(--text-muted); }
|
| 416 |
|
|
|
|
| 440 |
padding: 18px !important; gap: 12px !important;
|
| 441 |
}
|
| 442 |
.cc-brief .block, .cc-brief .form { background: transparent !important; border: none !important; box-shadow: none !important; }
|
| 443 |
+
/* Field labels only (Gradio marks them with block-info) — NOT checkbox/body labels */
|
| 444 |
+
.cc-brief span[data-testid="block-info"] {
|
| 445 |
font-family: var(--font-sans) !important; font-weight: 700 !important;
|
| 446 |
font-size: 0.875rem !important; color: var(--fire-600) !important;
|
| 447 |
}
|
| 448 |
+
.cc-lantern label, .cc-lantern label span {
|
| 449 |
+
font-family: var(--font-sans) !important; font-weight: 600 !important;
|
| 450 |
+
font-size: 1rem !important; color: var(--bark-800) !important;
|
| 451 |
+
}
|
| 452 |
.cc-brief textarea, .cc-brief input[type="text"], .cc-brief .dropdown input, .cc-brief .wrap-inner {
|
| 453 |
font-family: var(--font-sans) !important; font-size: 1rem !important; color: var(--text-strong) !important;
|
| 454 |
background: var(--surface-raised) !important;
|
|
|
|
| 464 |
font-family: var(--font-sans) !important; font-weight: 800 !important; font-size: 1rem !important;
|
| 465 |
line-height: 1 !important; color: #fff !important;
|
| 466 |
background: var(--primary) !important; border: none !important; border-radius: var(--radius-md) !important;
|
| 467 |
+
padding: 14px 24px !important; white-space: nowrap !important;
|
| 468 |
box-shadow: 0 var(--tactile-depth) 0 var(--primary-edge), 0 9px 10px rgba(39,26,15,.20) !important;
|
| 469 |
transform: translateY(0); transition: transform var(--dur-fast) var(--ease-out),
|
| 470 |
box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
|
| 471 |
}
|
| 472 |
+
button.cc-btn-secondary { white-space: nowrap !important; }
|
| 473 |
button.cc-btn:hover { background: var(--primary-hover) !important; }
|
| 474 |
button.cc-btn:active { transform: translateY(4px);
|
| 475 |
box-shadow: 0 1px 0 var(--primary-edge), 0 2px 4px rgba(39,26,15,.18) !important; }
|
|
|
|
| 600 |
gr.HTML('<div class="cc-kicker cc-kicker--fire">'
|
| 601 |
'<span class="cc-kicker__rule"></span><span>The brief</span>'
|
| 602 |
'<span class="cc-kicker__rule"></span></div>')
|
| 603 |
+
with gr.Row(equal_height=False):
|
| 604 |
+
current_in = gr.Textbox(label="UI copy on trial", scale=3, lines=5,
|
| 605 |
placeholder="Paste a button label, error message, empty state…")
|
| 606 |
with gr.Column(scale=2):
|
| 607 |
category_in = gr.Dropdown(CATEGORIES, value="button", label="Content type")
|
| 608 |
surface_in = gr.Textbox(label="Where it lives (optional)",
|
| 609 |
+
placeholder="e.g. checkout, settings page")
|
| 610 |
+
thinking_in = gr.Checkbox(value=True, elem_classes="cc-lantern",
|
| 611 |
+
label="🔦 Lantern mode — show their thinking (slower)")
|
| 612 |
with gr.Row():
|
| 613 |
+
battle_btn = gr.Button("🔥 Light the fire", elem_classes="cc-btn", scale=0, min_width=220)
|
| 614 |
+
smore_btn = gr.Button("🍫 S'more examples", elem_classes="cc-btn-secondary",
|
| 615 |
+
scale=0, min_width=200)
|
|
|
|
| 616 |
status_md = gr.HTML("")
|
| 617 |
with gr.Row():
|
| 618 |
card_a = gr.HTML()
|