simapeng commited on
Commit
503920a
·
1 Parent(s): 3be9b3c
Files changed (2) hide show
  1. __pycache__/app.cpython-37.pyc +0 -0
  2. app.py +48 -70
__pycache__/app.cpython-37.pyc CHANGED
Binary files a/__pycache__/app.cpython-37.pyc and b/__pycache__/app.cpython-37.pyc differ
 
app.py CHANGED
@@ -13,27 +13,26 @@ MAX_SEED = 2**32 - 1
13
  # ===== Custom aesthetic =====
14
  # Neo-noir dusk palette with cyan + amber accents, glass panels, and subtle grain.
15
  CUSTOM_CSS = """
16
- @import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');
17
-
18
  :root {
19
  --bg: #05080f;
20
- --panel: rgba(15, 24, 39, 0.78);
21
- --card: rgba(18, 28, 46, 0.72);
22
  --border: rgba(0, 224, 184, 0.25);
23
  --text: #e9f3ff;
24
- --muted: #8ba0c2;
25
- --accent: #00e0b8;
26
- --accent-2: #ffb703;
27
- --glow: 0 25px 70px rgba(0, 224, 184, 0.28);
28
- --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.45);
29
  --radius: 18px;
 
30
  }
31
 
32
  body, .gradio-container {
33
- font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
34
- background: radial-gradient(circle at 20% 20%, rgba(0, 224, 184, 0.08), transparent 30%),
35
- radial-gradient(circle at 80% 10%, rgba(255, 183, 3, 0.10), transparent 32%),
36
- linear-gradient(145deg, #05080f 0%, #0a1220 55%, #05080f 100%);
37
  color: var(--text);
38
  min-height: 100vh;
39
  }
@@ -43,44 +42,40 @@ body, .gradio-container {
43
  position: fixed;
44
  inset: 0;
45
  background: url('https://grainy-gradients.vercel.app/noise.svg');
46
- opacity: 0.25;
47
  pointer-events: none;
48
  mix-blend-mode: screen;
49
  }
50
 
51
- .gradio-container * {
52
- letter-spacing: 0.01em;
53
- }
54
 
55
  .gr-block, .gr-panel, .gr-group {
56
  background: var(--panel);
57
- border: 1px solid var(--border);
58
  border-radius: var(--radius);
59
- box-shadow: var(--shadow-strong);
60
- backdrop-filter: blur(12px);
61
  }
62
 
63
  .gradio-container .prose h1, .gradio-container .prose h2, .gradio-container .prose h3 {
64
- font-family: 'Chakra Petch', 'IBM Plex Sans', sans-serif;
65
  letter-spacing: 0.015em;
66
  text-transform: uppercase;
67
  }
68
 
69
  .gradio-container .prose h1 {
70
- font-size: 2.4rem;
71
- font-weight: 700;
72
- background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 65%, #ffffff 100%);
73
- -webkit-background-clip: text;
74
- -webkit-text-fill-color: transparent;
75
- text-shadow: 0 10px 30px rgba(0, 224, 184, 0.3);
76
  }
77
 
78
  .tagline {
79
  display: inline-flex;
80
  align-items: center;
81
  gap: 10px;
82
- padding: 10px 16px;
83
- background: linear-gradient(120deg, rgba(0, 224, 184, 0.18), rgba(255, 183, 3, 0.18));
84
  border: 1px solid var(--border);
85
  border-radius: 999px;
86
  font-size: 0.95rem;
@@ -92,8 +87,8 @@ body, .gradio-container {
92
  position: relative;
93
  overflow: hidden;
94
  background: var(--card);
95
- border: 1px solid rgba(255,255,255,0.04);
96
- padding: 18px 18px 12px 18px;
97
  border-radius: var(--radius);
98
  }
99
 
@@ -102,14 +97,14 @@ body, .gradio-container {
102
  position: absolute;
103
  width: 220px;
104
  height: 220px;
105
- background: radial-gradient(circle, rgba(0, 224, 184, 0.22) 0%, transparent 60%);
106
  top: -40px;
107
  right: -60px;
108
  filter: blur(30px);
109
  animation: drift 12s ease-in-out infinite alternate;
110
  }
111
 
112
- .hero-card p { color: var(--muted); }
113
 
114
  @keyframes drift {
115
  from { transform: translate3d(-6px, 0, 0); }
@@ -118,67 +113,50 @@ body, .gradio-container {
118
 
119
  /* Inputs */
120
  textarea, input, .gr-input, .gr-textbox, .gr-number, .gr-slider input {
121
- background: rgba(255,255,255,0.03) !important;
122
  border-radius: 14px !important;
123
- border: 1px solid rgba(255,255,255,0.08) !important;
124
  color: var(--text) !important;
125
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
126
  }
127
 
128
- label, .gr-box label { color: var(--muted) !important; font-weight: 600; letter-spacing: 0.04em; }
129
-
130
- .gr-slider input[type='range'] {
131
- accent-color: var(--accent);
132
- }
133
 
 
134
  .gradio-container .slider-container .single-slider {
135
- background: linear-gradient(90deg, rgba(0,224,184,0.4), rgba(255,183,3,0.5));
136
- height: 5px;
137
  border-radius: 999px;
138
  }
139
 
140
  /* Buttons */
141
- button.primary, .gr-button-primary {
142
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%) !important;
143
  color: #041019 !important;
144
- font-weight: 700 !important;
145
  border: none !important;
146
- box-shadow: 0 12px 30px rgba(0, 224, 184, 0.35), 0 2px 8px rgba(0,0,0,0.45);
147
  border-radius: 14px !important;
148
- transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
149
  }
150
 
151
- button.primary:hover, .gr-button-primary:hover {
152
- transform: translateY(-2px) scale(1.01);
153
- filter: brightness(1.03);
154
- box-shadow: 0 16px 40px rgba(0, 224, 184, 0.45);
155
- }
156
 
157
- button.secondary, .gr-button-secondary {
158
- background: rgba(255,255,255,0.04) !important;
159
- border: 1px solid rgba(255,255,255,0.08) !important;
160
  color: var(--text) !important;
 
161
  }
 
162
 
163
  /* Gallery */
164
- .gr-gallery { background: rgba(255,255,255,0.02); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.04); }
165
- .gr-gallery .thumbnail-item { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-strong); }
166
- .gr-gallery img { object-fit: cover; transition: transform 0.35s ease; }
167
- .gr-gallery img:hover { transform: scale(1.02); }
168
-
169
- /* Examples */
170
- .examples {
171
- background: rgba(255,255,255,0.03);
172
- border-radius: var(--radius);
173
- border: 1px solid rgba(255,255,255,0.08);
174
- padding: 12px 14px;
175
- box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
176
- }
177
-
178
- .block.responsive { gap: 14px; }
179
 
180
  /* Footer */
181
- .footer-note { color: var(--muted); font-size: 0.9rem; }
182
  """
183
 
184
  # Load the pipeline once at startup
 
13
  # ===== Custom aesthetic =====
14
  # Neo-noir dusk palette with cyan + amber accents, glass panels, and subtle grain.
15
  CUSTOM_CSS = """
 
 
16
  :root {
17
  --bg: #05080f;
18
+ --panel: rgba(12, 18, 32, 0.82);
19
+ --card: rgba(18, 28, 46, 0.78);
20
  --border: rgba(0, 224, 184, 0.25);
21
  --text: #e9f3ff;
22
+ --muted: #9fb2cf;
23
+ --accent: #24e0c2;
24
+ --accent-2: #ffb347;
25
+ --glow: 0 18px 50px rgba(36, 224, 194, 0.25);
26
+ --shadow-strong: 0 16px 46px rgba(0, 0, 0, 0.45);
27
  --radius: 18px;
28
+ --noise-opacity: 0.18;
29
  }
30
 
31
  body, .gradio-container {
32
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
33
+ background: radial-gradient(circle at 20% 20%, rgba(36, 224, 194, 0.10), transparent 30%),
34
+ radial-gradient(circle at 82% 12%, rgba(0, 156, 196, 0.20), transparent 34%),
35
+ linear-gradient(140deg, #05080f 0%, #0b1322 52%, #05080f 100%);
36
  color: var(--text);
37
  min-height: 100vh;
38
  }
 
42
  position: fixed;
43
  inset: 0;
44
  background: url('https://grainy-gradients.vercel.app/noise.svg');
45
+ opacity: var(--noise-opacity);
46
  pointer-events: none;
47
  mix-blend-mode: screen;
48
  }
49
 
50
+ .gradio-container * { letter-spacing: 0.01em; }
 
 
51
 
52
  .gr-block, .gr-panel, .gr-group {
53
  background: var(--panel);
54
+ border: 1px solid rgba(255,255,255,0.06);
55
  border-radius: var(--radius);
56
+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-strong);
57
+ backdrop-filter: blur(12px) saturate(115%);
58
  }
59
 
60
  .gradio-container .prose h1, .gradio-container .prose h2, .gradio-container .prose h3 {
 
61
  letter-spacing: 0.015em;
62
  text-transform: uppercase;
63
  }
64
 
65
  .gradio-container .prose h1 {
66
+ font-size: 2.1rem;
67
+ font-weight: 800;
68
+ color: var(--text);
69
+ text-shadow: 0 10px 30px rgba(36, 224, 194, 0.3);
70
+ margin-bottom: 6px;
 
71
  }
72
 
73
  .tagline {
74
  display: inline-flex;
75
  align-items: center;
76
  gap: 10px;
77
+ padding: 10px 18px;
78
+ background: linear-gradient(120deg, rgba(0, 224, 184, 0.24), rgba(255, 179, 71, 0.18));
79
  border: 1px solid var(--border);
80
  border-radius: 999px;
81
  font-size: 0.95rem;
 
87
  position: relative;
88
  overflow: hidden;
89
  background: var(--card);
90
+ border: 1px solid rgba(255,255,255,0.06);
91
+ padding: 22px 22px 18px 22px;
92
  border-radius: var(--radius);
93
  }
94
 
 
97
  position: absolute;
98
  width: 220px;
99
  height: 220px;
100
+ background: radial-gradient(circle, rgba(36, 224, 194, 0.20) 0%, transparent 60%);
101
  top: -40px;
102
  right: -60px;
103
  filter: blur(30px);
104
  animation: drift 12s ease-in-out infinite alternate;
105
  }
106
 
107
+ .hero-card p { color: #c4d2ea; line-height: 1.5; }
108
 
109
  @keyframes drift {
110
  from { transform: translate3d(-6px, 0, 0); }
 
113
 
114
  /* Inputs */
115
  textarea, input, .gr-input, .gr-textbox, .gr-number, .gr-slider input {
116
+ background: rgba(255,255,255,0.04) !important;
117
  border-radius: 14px !important;
118
+ border: 1px solid rgba(255,255,255,0.10) !important;
119
  color: var(--text) !important;
120
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
121
  }
122
 
123
+ label, .gr-box label { color: #c4d2ea !important; font-weight: 700; letter-spacing: 0.02em; }
 
 
 
 
124
 
125
+ .gr-slider input[type='range'] { accent-color: var(--accent); }
126
  .gradio-container .slider-container .single-slider {
127
+ background: linear-gradient(90deg, rgba(36,224,194,0.6), rgba(255,179,71,0.6));
128
+ height: 6px;
129
  border-radius: 999px;
130
  }
131
 
132
  /* Buttons */
133
+ .gr-button-primary, button.primary {
134
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%) !important;
135
  color: #041019 !important;
136
+ font-weight: 800 !important;
137
  border: none !important;
138
+ box-shadow: 0 12px 30px rgba(36,224,194,0.35), 0 2px 8px rgba(0,0,0,0.45);
139
  border-radius: 14px !important;
 
140
  }
141
 
142
+ .gr-button-primary:hover { transform: translateY(-1px) scale(1.01); filter: brightness(1.03); }
 
 
 
 
143
 
144
+ .gr-button-secondary, button.secondary, .gr-downloadbutton {
145
+ background: rgba(255,255,255,0.05) !important;
146
+ border: 1px solid rgba(255,255,255,0.12) !important;
147
  color: var(--text) !important;
148
+ border-radius: 14px !important;
149
  }
150
+ .gr-downloadbutton, .gr-downloadbutton > button { width: 100%; }
151
 
152
  /* Gallery */
153
+ .gr-gallery { background: rgba(255,255,255,0.03); border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.08); }
154
+ .gr-gallery .thumbnail-item { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
155
+ .gr-gallery img { object-fit: cover; transition: transform 0.28s ease, filter 0.28s ease; }
156
+ .gr-gallery img:hover { transform: scale(1.03); filter: saturate(1.05); }
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  /* Footer */
159
+ .footer-note { color: #a8b8d4; font-size: 0.95rem; letter-spacing: 0.01em; }
160
  """
161
 
162
  # Load the pipeline once at startup