Restore original Ananke interface (as before redesign)
Browse files
app.py
CHANGED
|
@@ -127,126 +127,53 @@ THEME = gr.themes.Soft(
|
|
| 127 |
)
|
| 128 |
|
| 129 |
CSS = """
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
--button-primary-text-color: #0B0F14;
|
| 146 |
-
--button-secondary-background-fill: #1B2334;
|
| 147 |
-
--button-secondary-background-fill-hover: #232E45;
|
| 148 |
-
--button-secondary-text-color: #E6EAF2;
|
| 149 |
-
--button-secondary-border-color: rgba(255,255,255,.14);
|
| 150 |
-
--input-background-fill: #0F1522;
|
| 151 |
-
--input-border-color: rgba(255,255,255,.12);
|
| 152 |
-
--input-text-color: #E6EAF2;
|
| 153 |
-
--input-placeholder-color: #7C8AA0;
|
| 154 |
-
max-width: 920px !important; margin: auto !important; background: #0A0E14 !important; color: #E6EAF2 !important; font-family: 'Space Grotesk', system-ui, sans-serif !important;
|
| 155 |
-
}
|
| 156 |
-
.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); }
|
| 157 |
-
.hero .hero-top { display: flex; gap: 18px; align-items: flex-start; }
|
| 158 |
-
.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; }
|
| 159 |
-
.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; }
|
| 160 |
-
.hero .tagline { font-size: 16.5px; color: rgba(230,234,242,.85) !important; margin: 0 0 16px; line-height: 1.5; }
|
| 161 |
-
.hero .tagline b, .hero .tagline strong { color: #E5C15D !important; }
|
| 162 |
-
.hero .pills { display: flex; flex-wrap: wrap; gap: 8px; }
|
| 163 |
-
.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; }
|
| 164 |
-
.hero .pill b { color: #E5C15D; }
|
| 165 |
-
.gradio-container .block,
|
| 166 |
-
.gradio-container .form,
|
| 167 |
-
.gradio-container .wrap,
|
| 168 |
-
.gradio-container .panel,
|
| 169 |
-
.gradio-container .component,
|
| 170 |
-
.gradio-container .audio,
|
| 171 |
-
.gradio-container .plot,
|
| 172 |
-
.gradio-container .input,
|
| 173 |
-
.gradio-container .output {
|
| 174 |
-
border-radius: 18px !important;
|
| 175 |
-
overflow: hidden !important;
|
| 176 |
-
border: 1px solid rgba(255,255,255,.09) !important;
|
| 177 |
-
background: #141A26 !important;
|
| 178 |
-
box-shadow: 0 4px 24px rgba(0,0,0,.35) !important;
|
| 179 |
-
}
|
| 180 |
-
.gradio-container .block:has(.hero),
|
| 181 |
-
.gradio-container .block:has(.card),
|
| 182 |
-
.gradio-container .block.footnote {
|
| 183 |
-
background: transparent !important;
|
| 184 |
-
border: none !important;
|
| 185 |
-
box-shadow: none !important;
|
| 186 |
-
}
|
| 187 |
-
.gradio-container button { border-radius: 12px !important; }
|
| 188 |
-
.gradio-container button.primary { background: #F2F5F9 !important; color: #0B0F14 !important; border: none !important; }
|
| 189 |
-
.gradio-container button.primary:hover { background: #FFFFFF !important; }
|
| 190 |
-
.gradio-container input[type="text"],
|
| 191 |
-
.gradio-container textarea,
|
| 192 |
-
.gradio-container input[type="number"] { border-radius: 12px !important; background: #0F1522 !important; color: #E6EAF2 !important; }
|
| 193 |
-
.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; }
|
| 194 |
-
.gradio-container .tab-nav button { border-radius: 10px !important; border: none !important; color: #C7CEDD !important; background: transparent !important; }
|
| 195 |
-
.gradio-container .tab-nav button.selected { background: #F2F5F9 !important; color: #0B0F14 !important; }
|
| 196 |
-
.gradio-container .radio label,
|
| 197 |
-
.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; }
|
| 198 |
-
.gradio-container .radio label:has(input:checked) { border-color: #C9A227 !important; }
|
| 199 |
-
.gradio-container label span { font-weight: 600 !important; color: #E6EAF2 !important; }
|
| 200 |
-
.gradio-container audio { border-radius: 12px !important; }
|
| 201 |
-
.gradio-container .prose { color: #C7CEDD !important; }
|
| 202 |
-
.gradio-container .prose strong { color: #E6EAF2 !important; }
|
| 203 |
-
|
| 204 |
-
.hero .kicker { display: inline-block; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: #E5C15D; border: 1px solid rgba(201,162,39,.5); border-radius: 999px; padding: 5px 14px; margin-bottom: 14px; }
|
| 205 |
-
.hero h1 .v1 { background: #C9A227; color: #0D1B2A; font-size: 20px; border-radius: 10px; padding: 3px 10px; vertical-align: middle; margin-left: 8px; letter-spacing: 0; font-family: 'Space Grotesk', system-ui, sans-serif; }
|
| 206 |
.chips { flex-wrap: wrap !important; gap: 8px !important; margin: 10px 0 4px; }
|
| 207 |
-
.chip { border-radius: 999px !important; font-size: 13px !important; padding: 7px 14px !important;
|
| 208 |
-
|
|
|
|
|
|
|
| 209 |
.ask-btn { border-radius: 14px !important; font-size: 17px !important; padding: 12px !important; }
|
| 210 |
.big-q textarea { font-size: 16px !important; border-radius: 14px !important; }
|
| 211 |
-
.card { border-radius: 18px; padding: 24px 26px; margin-top: 16px;
|
| 212 |
-
|
| 213 |
-
.card.
|
| 214 |
-
.card.
|
| 215 |
-
.card.
|
| 216 |
-
.card.
|
| 217 |
-
.
|
| 218 |
-
.
|
| 219 |
-
.
|
| 220 |
-
.
|
|
|
|
| 221 |
.quotes { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
|
| 222 |
-
.quote { background: #
|
| 223 |
-
|
| 224 |
-
.quote
|
| 225 |
-
.
|
|
|
|
| 226 |
.src-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
|
| 227 |
-
.src-pills span { background: #
|
| 228 |
-
|
| 229 |
-
.footer
|
| 230 |
-
|
| 231 |
-
/* Gradio 6 radio options are labels with data-testid like "peak-radio-label" (no .radio class) */
|
| 232 |
-
.gradio-container label[data-testid$="-radio-label"] {
|
| 233 |
-
border-radius: 999px !important;
|
| 234 |
-
border: 1px solid rgba(255,255,255,.12) !important;
|
| 235 |
-
padding: 6px 14px !important;
|
| 236 |
-
background: #1B2334 !important;
|
| 237 |
-
color: #E6EAF2 !important;
|
| 238 |
-
}
|
| 239 |
-
.gradio-container label[data-testid$="-radio-label"].selected {
|
| 240 |
-
border-color: #C9A227 !important;
|
| 241 |
-
background: #232E45 !important;
|
| 242 |
-
}
|
| 243 |
-
.gradio-container label[data-testid$="-radio-label"] span {
|
| 244 |
-
color: #E6EAF2 !important;
|
| 245 |
-
background: transparent !important;
|
| 246 |
-
}
|
| 247 |
"""
|
| 248 |
|
| 249 |
-
HERO = f"""<div class="hero">
|
| 250 |
<div class="kicker">AMEFORGE · Research prototype</div>
|
| 251 |
<h1>Ananke <span class="v1">v1</span></h1>
|
| 252 |
<p class="tagline">A memory that learns by reading — no hand-written answer rules.</p>
|
|
@@ -255,7 +182,7 @@ HERO = f"""<div class="hero"><div class="hero-top"><div class="hero-icon"><svg w
|
|
| 255 |
<span class="pill"><b>{S['faits']:,}</b> facts</span>
|
| 256 |
<span class="pill"><b>{S['mots_lus']:,}</b> words</span>
|
| 257 |
<span class="pill">runs on CPU</span>
|
| 258 |
-
</div></div>
|
| 259 |
|
| 260 |
FOOTER = """<div class="footer">Research prototype by <b>AMEFORGE</b> (Windsor, Canada) ·
|
| 261 |
<a href="https://huggingface.co/AMFORGE/ananke-v1">model card</a> ·
|
|
|
|
| 127 |
)
|
| 128 |
|
| 129 |
CSS = """
|
| 130 |
+
.gradio-container { max-width: 940px !important; }
|
| 131 |
+
.hero { background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 55%, #92400e 130%);
|
| 132 |
+
border-radius: 22px; padding: 38px 34px 30px; color: #fff; margin-bottom: 20px;
|
| 133 |
+
box-shadow: 0 12px 40px rgba(30,27,75,.35); }
|
| 134 |
+
.hero .kicker { display: inline-block; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase;
|
| 135 |
+
color: #fcd34d; border: 1px solid rgba(252,211,77,.5); border-radius: 999px;
|
| 136 |
+
padding: 5px 14px; margin-bottom: 14px; }
|
| 137 |
+
.hero h1 { font-size: 44px; margin: 0 0 6px; font-weight: 800; letter-spacing: -1px; }
|
| 138 |
+
.hero h1 .v1 { background: #fcd34d; color: #1e1b4b; font-size: 20px; border-radius: 10px;
|
| 139 |
+
padding: 3px 10px; vertical-align: middle; margin-left: 8px; letter-spacing: 0; }
|
| 140 |
+
.hero .tagline { font-size: 18px; opacity: .92; margin: 0 0 18px; }
|
| 141 |
+
.hero .pills { display: flex; flex-wrap: wrap; gap: 10px; }
|
| 142 |
+
.hero .pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
|
| 143 |
+
border-radius: 999px; padding: 6px 15px; font-size: 13.5px; }
|
| 144 |
+
.hero .pill b { color: #fcd34d; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
.chips { flex-wrap: wrap !important; gap: 8px !important; margin: 10px 0 4px; }
|
| 146 |
+
.chip { border-radius: 999px !important; font-size: 13px !important; padding: 7px 14px !important;
|
| 147 |
+
background: #eef2ff !important; border: 1px solid #c7d2fe !important; color: #3730a3 !important;
|
| 148 |
+
flex: 0 1 auto !important; }
|
| 149 |
+
.chip:hover { background: #e0e7ff !important; }
|
| 150 |
.ask-btn { border-radius: 14px !important; font-size: 17px !important; padding: 12px !important; }
|
| 151 |
.big-q textarea { font-size: 16px !important; border-radius: 14px !important; }
|
| 152 |
+
.card { border-radius: 18px; padding: 24px 26px; margin-top: 16px;
|
| 153 |
+
background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 6px 24px rgba(15,23,42,.07); }
|
| 154 |
+
.card.ans { border-top: 5px solid #4f46e5; }
|
| 155 |
+
.card.defn { border-top: 5px solid #d97706; }
|
| 156 |
+
.card.idk { border-top: 5px solid #94a3b8; background: #f8fafc; }
|
| 157 |
+
.card.teach { border-top: 5px solid #059669; }
|
| 158 |
+
.card.empty { color: #64748b; }
|
| 159 |
+
.headline { font-size: 30px; font-weight: 800; color: #1e1b4b; margin-bottom: 4px; letter-spacing: -.5px; }
|
| 160 |
+
.idk-title { font-size: 26px; font-weight: 800; color: #475569; margin-bottom: 8px; }
|
| 161 |
+
.where { color: #64748b; font-size: 14px; margin-bottom: 14px; }
|
| 162 |
+
.hint { color: #64748b; font-size: 13.5px; margin-top: 10px; }
|
| 163 |
.quotes { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
|
| 164 |
+
.quote { background: #f1f5f9; border-left: 4px solid #818cf8; border-radius: 0 12px 12px 0;
|
| 165 |
+
padding: 12px 16px; }
|
| 166 |
+
.quote p { margin: 0 0 6px; color: #1e293b; font-size: 15px; line-height: 1.55; }
|
| 167 |
+
.quote .src { font-size: 12.5px; color: #64748b; }
|
| 168 |
+
.card ul { margin: 8px 0; padding-left: 20px; color: #1e293b; }
|
| 169 |
.src-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
|
| 170 |
+
.src-pills span { background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3;
|
| 171 |
+
border-radius: 999px; padding: 5px 13px; font-size: 13px; }
|
| 172 |
+
.footer { text-align: center; color: #94a3b8; font-size: 13px; margin: 26px 0 10px; }
|
| 173 |
+
.footer a { color: #4f46e5; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
"""
|
| 175 |
|
| 176 |
+
HERO = f"""<div class="hero">
|
| 177 |
<div class="kicker">AMEFORGE · Research prototype</div>
|
| 178 |
<h1>Ananke <span class="v1">v1</span></h1>
|
| 179 |
<p class="tagline">A memory that learns by reading — no hand-written answer rules.</p>
|
|
|
|
| 182 |
<span class="pill"><b>{S['faits']:,}</b> facts</span>
|
| 183 |
<span class="pill"><b>{S['mots_lus']:,}</b> words</span>
|
| 184 |
<span class="pill">runs on CPU</span>
|
| 185 |
+
</div></div>"""
|
| 186 |
|
| 187 |
FOOTER = """<div class="footer">Research prototype by <b>AMEFORGE</b> (Windsor, Canada) ·
|
| 188 |
<a href="https://huggingface.co/AMFORGE/ananke-v1">model card</a> ·
|