ameforge commited on
Commit
2bee5ac
·
verified ·
1 Parent(s): 6eb0c41

Dark pro UI: dark theme, gold accents, rounded components

Browse files
Files changed (1) hide show
  1. app.py +61 -61
app.py CHANGED
@@ -10,19 +10,40 @@ R = K.Recognizer(os.path.join(d, "audio2b_KEEP_graine0.pt"), os.path.join(d, "au
10
 
11
  CSS = """
12
  @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Space+Grotesk:wght@400;500;600&display=swap');
13
- .gradio-container { max-width: 920px !important; margin: auto !important; background: #F5F4F0 !important; font-family: 'Space Grotesk', system-ui, sans-serif !important; }
14
- .hero { background: linear-gradient(135deg, #0D1B2A 0%, #1B3A5C 100%); border-radius: 22px; padding: 34px 32px 26px; color: #fff; margin-bottom: 22px; box-shadow: 0 12px 40px rgba(13,27,42,.25); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  .hero .hero-top { display: flex; gap: 18px; align-items: flex-start; }
16
- .hero .hero-icon { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; background: rgba(201,162,39,.18); border: 1px solid rgba(201,162,39,.5); display: flex; align-items: center; justify-content: center; color: #C9A227; }
17
- .hero h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 46px; margin: 0 0 6px; font-weight: 700; letter-spacing: -.5px; line-height: 1.05; }
18
- .hero .tagline { font-size: 16.5px; opacity: .92; margin: 0 0 16px; line-height: 1.5; }
 
19
  .hero .pills { display: flex; flex-wrap: wrap; gap: 8px; }
20
- .hero .pill { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; }
21
- .hero .pill b { color: #C9A227; }
22
- button.primary { background: #0D1B2A !important; border-radius: 12px !important; }
23
- .footnote { color: #64748b; font-size: 13.5px; line-height: 1.55; margin-top: 18px; }
24
-
25
- /* ---- Every Gradio component: rounded, soft border, soft shadow (no square boxes) ---- */
26
  .gradio-container .block,
27
  .gradio-container .form,
28
  .gradio-container .wrap,
@@ -34,9 +55,9 @@ button.primary { background: #0D1B2A !important; border-radius: 12px !important;
34
  .gradio-container .output {
35
  border-radius: 18px !important;
36
  overflow: hidden !important;
37
- border: 1px solid #E2E8F0 !important;
38
- background: #FFFFFF !important;
39
- box-shadow: 0 4px 20px rgba(13,27,42,.06) !important;
40
  }
41
  .gradio-container .block:has(.hero),
42
  .gradio-container .block:has(.card),
@@ -45,61 +66,40 @@ button.primary { background: #0D1B2A !important; border-radius: 12px !important;
45
  border: none !important;
46
  box-shadow: none !important;
47
  }
48
- .gradio-container button {
49
- border-radius: 12px !important;
50
- }
51
- .gradio-container button.primary {
52
- background: #0D1B2A !important;
53
- color: #fff !important;
54
- border: none !important;
55
- }
56
- .gradio-container button.primary:hover {
57
- background: #1B3A5C !important;
58
- }
59
  .gradio-container input[type="text"],
60
  .gradio-container textarea,
61
- .gradio-container input[type="number"] {
62
- border-radius: 12px !important;
63
- }
64
- .gradio-container .tab-nav {
65
- background: #FFFFFF !important;
66
- border: 1px solid #E2E8F0 !important;
67
- border-radius: 14px !important;
68
- padding: 4px !important;
69
- gap: 4px !important;
70
- }
71
- .gradio-container .tab-nav button {
72
- border-radius: 10px !important;
73
- border: none !important;
74
- }
75
- .gradio-container .tab-nav button.selected {
76
- background: #0D1B2A !important;
77
- color: #fff !important;
78
- }
79
  .gradio-container .radio label,
80
- .gradio-container [class*="radio"] label {
 
 
 
 
 
 
 
 
 
81
  border-radius: 999px !important;
82
- border: 1px solid #E2E8F0 !important;
83
  padding: 6px 14px !important;
84
- background: #FFFFFF !important;
 
85
  }
86
- .gradio-container label span {
87
- font-weight: 600 !important;
88
- color: #0D1B2A !important;
89
  }
90
- .gradio-container audio {
91
- border-radius: 12px !important;
 
92
  }
93
-
94
- /* ---- Hero text must stay white on the dark navy hero (Gradio theme otherwise forces dark text) ---- */
95
- .hero h1 { color: #FFFFFF !important; }
96
- .hero .tagline { color: rgba(255,255,255,.92) !important; }
97
- .hero .pill { color: #FFFFFF !important; }
98
- .hero .hero-icon { color: #E5C15D !important; background: rgba(201,162,39,.25) !important; }
99
-
100
- /* Bold words inside the hero tagline + solid gold icon tile for contrast */
101
- .hero .tagline b, .hero .tagline strong { color: #E5C15D !important; }
102
- .hero .hero-icon { background: #C9A227 !important; color: #0D1B2A !important; }
103
  """
104
 
105
  # Simple, professional mark: a plus sign for "learning something new", drawn as SVG, not an emoji.
 
10
 
11
  CSS = """
12
  @import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Space+Grotesk:wght@400;500;600&display=swap');
13
+ body { background: #0A0E14 !important; }
14
+ .gradio-container {
15
+ --body-background-fill: #0A0E14;
16
+ --background-fill-primary: #0A0E14;
17
+ --background-fill-secondary: #121826;
18
+ --block-background-fill: #141A26;
19
+ --block-border-color: rgba(255,255,255,.09);
20
+ --block-label-background-fill: #141A26;
21
+ --block-label-text-color: #E6EAF2;
22
+ --block-title-text-color: #E6EAF2;
23
+ --body-text-color: #E6EAF2;
24
+ --body-text-color-subdued: #94A3B8;
25
+ --button-primary-background-fill: #F2F5F9;
26
+ --button-primary-background-fill-hover: #FFFFFF;
27
+ --button-primary-text-color: #0B0F14;
28
+ --button-secondary-background-fill: #1B2334;
29
+ --button-secondary-background-fill-hover: #232E45;
30
+ --button-secondary-text-color: #E6EAF2;
31
+ --button-secondary-border-color: rgba(255,255,255,.14);
32
+ --input-background-fill: #0F1522;
33
+ --input-border-color: rgba(255,255,255,.12);
34
+ --input-text-color: #E6EAF2;
35
+ --input-placeholder-color: #7C8AA0;
36
+ max-width: 920px !important; margin: auto !important; background: #0A0E14 !important; color: #E6EAF2 !important; font-family: 'Space Grotesk', system-ui, sans-serif !important;
37
+ }
38
+ .hero { background: linear-gradient(135deg, #16233C 0%, #0B1220 100%); border: 1px solid rgba(255,255,255,.09); border-radius: 22px; padding: 34px 32px 26px; color: #fff; margin-bottom: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
39
  .hero .hero-top { display: flex; gap: 18px; align-items: flex-start; }
40
+ .hero .hero-icon { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 16px; background: #C9A227 !important; color: #0D1B2A !important; display: flex; align-items: center; justify-content: center; }
41
+ .hero h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 46px; margin: 0 0 6px; font-weight: 700; letter-spacing: -.5px; line-height: 1.05; color: #FFFFFF !important; }
42
+ .hero .tagline { font-size: 16.5px; color: rgba(230,234,242,.85) !important; margin: 0 0 16px; line-height: 1.5; }
43
+ .hero .tagline b, .hero .tagline strong { color: #E5C15D !important; }
44
  .hero .pills { display: flex; flex-wrap: wrap; gap: 8px; }
45
+ .hero .pill { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; color: #FFFFFF !important; }
46
+ .hero .pill b { color: #E5C15D; }
 
 
 
 
47
  .gradio-container .block,
48
  .gradio-container .form,
49
  .gradio-container .wrap,
 
55
  .gradio-container .output {
56
  border-radius: 18px !important;
57
  overflow: hidden !important;
58
+ border: 1px solid rgba(255,255,255,.09) !important;
59
+ background: #141A26 !important;
60
+ box-shadow: 0 4px 24px rgba(0,0,0,.35) !important;
61
  }
62
  .gradio-container .block:has(.hero),
63
  .gradio-container .block:has(.card),
 
66
  border: none !important;
67
  box-shadow: none !important;
68
  }
69
+ .gradio-container button { border-radius: 12px !important; }
70
+ .gradio-container button.primary { background: #F2F5F9 !important; color: #0B0F14 !important; border: none !important; }
71
+ .gradio-container button.primary:hover { background: #FFFFFF !important; }
 
 
 
 
 
 
 
 
72
  .gradio-container input[type="text"],
73
  .gradio-container textarea,
74
+ .gradio-container input[type="number"] { border-radius: 12px !important; background: #0F1522 !important; color: #E6EAF2 !important; }
75
+ .gradio-container .tab-nav { background: #141A26 !important; border: 1px solid rgba(255,255,255,.09) !important; border-radius: 14px !important; padding: 4px !important; gap: 4px !important; }
76
+ .gradio-container .tab-nav button { border-radius: 10px !important; border: none !important; color: #C7CEDD !important; background: transparent !important; }
77
+ .gradio-container .tab-nav button.selected { background: #F2F5F9 !important; color: #0B0F14 !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  .gradio-container .radio label,
79
+ .gradio-container [class*="radio"] label { border-radius: 999px !important; border: 1px solid rgba(255,255,255,.12) !important; padding: 6px 14px !important; background: #1B2334 !important; color: #E6EAF2 !important; }
80
+ .gradio-container .radio label:has(input:checked) { border-color: #C9A227 !important; }
81
+ .gradio-container label span { font-weight: 600 !important; color: #E6EAF2 !important; }
82
+ .gradio-container audio { border-radius: 12px !important; }
83
+ .gradio-container .prose { color: #C7CEDD !important; }
84
+ .gradio-container .prose strong { color: #E6EAF2 !important; }
85
+ .footnote { color: #7C8AA0; font-size: 13.5px; line-height: 1.55; margin-top: 18px; }
86
+
87
+ /* Gradio 6 radio options are labels with data-testid like "peak-radio-label" (no .radio class) */
88
+ .gradio-container label[data-testid$="-radio-label"] {
89
  border-radius: 999px !important;
90
+ border: 1px solid rgba(255,255,255,.12) !important;
91
  padding: 6px 14px !important;
92
+ background: #1B2334 !important;
93
+ color: #E6EAF2 !important;
94
  }
95
+ .gradio-container label[data-testid$="-radio-label"].selected {
96
+ border-color: #C9A227 !important;
97
+ background: #232E45 !important;
98
  }
99
+ .gradio-container label[data-testid$="-radio-label"] span {
100
+ color: #E6EAF2 !important;
101
+ background: transparent !important;
102
  }
 
 
 
 
 
 
 
 
 
 
103
  """
104
 
105
  # Simple, professional mark: a plus sign for "learning something new", drawn as SVG, not an emoji.