Spaces:
Running
Running
UI: GritAI engineered/industrial design system (dark, grit-orange, Archivo+IBM Plex)
Browse files
app.py
CHANGED
|
@@ -130,66 +130,190 @@ def api_summarize():
|
|
| 130 |
headers={"Cache-Control": "no-cache", "X-Accel-Buffering": "no"})
|
| 131 |
|
| 132 |
PAGE = """<!doctype html><html lang="en"><head><meta charset="utf-8">
|
| 133 |
-
<title>Summarizer —
|
| 134 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
|
|
|
|
|
|
| 135 |
<style>
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
</style></head>
|
| 170 |
-
<body><div class="
|
| 171 |
-
<header>
|
| 172 |
-
<
|
| 173 |
-
<
|
| 174 |
-
<
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
</
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
</div>
|
|
|
|
| 187 |
</div>
|
| 188 |
<div class="out" id="out">
|
| 189 |
-
<div class="
|
| 190 |
-
<div class="card"><div id="result"></div></div>
|
| 191 |
</div>
|
| 192 |
-
<
|
|
|
|
|
|
|
|
|
|
| 193 |
</div><script>
|
| 194 |
let length="standard",busy=false;
|
| 195 |
const src=document.getElementById('src'),url=document.getElementById('url'),go=document.getElementById('go'),
|
|
@@ -200,7 +324,7 @@ function copyOut(){navigator.clipboard.writeText(result.textContent);copy.textCo
|
|
| 200 |
async function run(){if(busy)return;const text=src.value.trim(),u=url.value.trim();
|
| 201 |
if(!text&&!u){src.focus();return;}
|
| 202 |
busy=true;go.disabled=true;go.textContent='Summarizing…';out.classList.add('show');copy.style.display='none';
|
| 203 |
-
result.innerHTML='<span class="
|
| 204 |
let full='';
|
| 205 |
try{
|
| 206 |
const r=await fetch('/api/summarize',{method:'POST',headers:{'Content-Type':'application/json'},
|
|
|
|
| 130 |
headers={"Cache-Control": "no-cache", "X-Accel-Buffering": "no"})
|
| 131 |
|
| 132 |
PAGE = """<!doctype html><html lang="en"><head><meta charset="utf-8">
|
| 133 |
+
<title>Text Summarizer — GritAI</title>
|
| 134 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 135 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 136 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 137 |
+
<link href="https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap" rel="stylesheet">
|
| 138 |
<style>
|
| 139 |
+
/* ============================================================================
|
| 140 |
+
GRITAI DESIGN SYSTEM — "Engineered / Industrial"
|
| 141 |
+
Dark · grit-orange · Archivo + IBM Plex · blueprint grid + grain.
|
| 142 |
+
Canonical source of truth for every GritAI app (30-in-15 #1-30) + the hub.
|
| 143 |
+
Rob-approved 2026-09-05 (#9 pilot: design-critic 5.71 -> 7.57).
|
| 144 |
+
|
| 145 |
+
HOW TO USE: embed this <style> verbatim in an app's page, add the Google Fonts
|
| 146 |
+
<link> below, then build the body from the component classes here. Keep the
|
| 147 |
+
header (monogram + app name + tags), grit-orange as the ONLY accent, dark bg.
|
| 148 |
+
|
| 149 |
+
FONTS (add to <head>):
|
| 150 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 151 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 152 |
+
<link href="https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap" rel="stylesheet">
|
| 153 |
+
============================================================================ */
|
| 154 |
+
:root{
|
| 155 |
+
--bg:#0a0b0e; --bg2:#0e1015; --panel:#111318; --panel2:#15181f;
|
| 156 |
+
--ink:#eef0f4; --dim:#9aa1b0; --dim2:#5f6675; --line:#20242e; --line2:#2b303c;
|
| 157 |
+
--grit:#ff5a2a; --grit2:#ff7d54; --grit-dim:#c9451f; --ok:#5fd08a; --bad:#ff6b6b;
|
| 158 |
+
--disp:'Archivo',system-ui,sans-serif; --body:'IBM Plex Sans',system-ui,sans-serif;
|
| 159 |
+
--mono:'IBM Plex Mono',ui-monospace,monospace;
|
| 160 |
+
}
|
| 161 |
+
*{box-sizing:border-box}
|
| 162 |
+
html,body{height:100%}
|
| 163 |
+
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.6;
|
| 164 |
+
-webkit-font-smoothing:antialiased;position:relative;overflow-x:hidden}
|
| 165 |
+
/* blueprint grid + vignette */
|
| 166 |
+
body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
|
| 167 |
+
background:linear-gradient(0deg,transparent 95%,rgba(255,90,42,.04) 100%),
|
| 168 |
+
repeating-linear-gradient(90deg,transparent 0 63px,rgba(255,255,255,.018) 63px 64px),
|
| 169 |
+
repeating-linear-gradient(0deg,transparent 0 63px,rgba(255,255,255,.018) 63px 64px),
|
| 170 |
+
radial-gradient(120% 80% at 50% -10%,#141821 0%,var(--bg) 55%)}
|
| 171 |
+
/* film grain */
|
| 172 |
+
body::after{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.05;mix-blend-mode:overlay;
|
| 173 |
+
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
|
| 174 |
+
.wrap{position:relative;z-index:1;max-width:960px;margin:0 auto;padding:0 28px 70px}
|
| 175 |
+
|
| 176 |
+
/* ---- header band (monogram SVG + wordmark + tags) ---- */
|
| 177 |
+
header{display:flex;align-items:center;gap:16px;padding:22px 0 18px;border-bottom:1px solid var(--line);animation:fade .6s .02s both}
|
| 178 |
+
.mark{width:38px;height:38px;flex:none}.mark svg{display:block}
|
| 179 |
+
.brand{display:flex;flex-direction:column;line-height:1}
|
| 180 |
+
.brand .co{font-family:var(--disp);font-weight:900;font-size:19px;letter-spacing:.5px}.brand .co b{color:var(--grit)}
|
| 181 |
+
.brand .sub{font-family:var(--mono);font-size:10.5px;letter-spacing:.28em;text-transform:uppercase;color:var(--dim2);margin-top:5px}
|
| 182 |
+
.tags{margin-left:auto;display:flex;gap:8px}
|
| 183 |
+
.tag{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--dim);border:1px solid var(--line2);border-radius:2px;padding:5px 9px}
|
| 184 |
+
.tag.hot{color:var(--grit);border-color:var(--grit-dim)}
|
| 185 |
+
/* canonical monogram SVG (paste in .mark):
|
| 186 |
+
<svg width="38" height="38" viewBox="0 0 38 38" fill="none"><rect x="1" y="1" width="36" height="36" rx="2" stroke="#2b303c"/><path d="M27 12.5A9 9 0 1 0 28 22H19" stroke="#ff5a2a" stroke-width="2.4" stroke-linecap="square"/><rect x="10.5" y="10.5" width="3" height="3" fill="#ff5a2a"/></svg> */
|
| 187 |
+
|
| 188 |
+
/* ---- hero ---- */
|
| 189 |
+
.hero{padding:34px 0 26px;animation:fade .6s .12s both}
|
| 190 |
+
.hero h1{font-family:var(--disp);font-weight:800;font-size:clamp(30px,5.4vw,52px);line-height:1.02;letter-spacing:-.02em;margin:0;max-width:16ch}
|
| 191 |
+
.hero h1 em{font-style:normal;color:var(--grit)}
|
| 192 |
+
.hero p{color:var(--dim);max-width:56ch;margin:16px 0 0;font-size:15.5px}
|
| 193 |
+
|
| 194 |
+
/* ---- section label (01 · NAME + rule) ---- */
|
| 195 |
+
.sec{display:flex;align-items:center;gap:14px;margin:30px 0 14px}
|
| 196 |
+
.sec .num{font-family:var(--mono);font-size:11px;font-weight:600;color:var(--grit);letter-spacing:.1em}
|
| 197 |
+
.sec .name{font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.26em;text-transform:uppercase;color:var(--dim)}
|
| 198 |
+
.sec .rule{flex:1;height:1px;background:linear-gradient(90deg,var(--line2),transparent)}
|
| 199 |
+
|
| 200 |
+
/* ---- panels ---- */
|
| 201 |
+
.panel{border:1px solid var(--line);border-radius:3px;background:linear-gradient(180deg,var(--panel),var(--bg2))}
|
| 202 |
+
.card{border:1px solid var(--line2);border-radius:3px;background:var(--panel);padding:18px 20px}
|
| 203 |
+
.card.accent{border-left:2px solid var(--grit)}
|
| 204 |
+
|
| 205 |
+
/* ---- input field (terminal) ---- */
|
| 206 |
+
.field{display:flex;align-items:stretch;border:1px solid var(--line2);border-radius:3px;background:var(--panel);overflow:hidden;transition:border-color .18s}
|
| 207 |
+
.field:focus-within{border-color:var(--grit-dim)}
|
| 208 |
+
.field .car{font-family:var(--mono);color:var(--grit);padding:16px 0 16px 16px;font-size:15px;user-select:none}
|
| 209 |
+
.field input,.field textarea{flex:1;background:transparent;border:0;outline:none;color:var(--ink);font-family:var(--body);font-size:15.5px;padding:16px 14px;resize:vertical}
|
| 210 |
+
.field input::placeholder,.field textarea::placeholder{color:var(--dim2)}
|
| 211 |
+
textarea.ta{width:100%;min-height:140px;border:1px solid var(--line2);border-radius:3px;background:var(--panel);color:var(--ink);font-family:var(--body);font-size:15px;padding:14px 16px;outline:none;resize:vertical}
|
| 212 |
+
textarea.ta:focus{border-color:var(--grit-dim)}
|
| 213 |
+
|
| 214 |
+
/* ---- buttons ---- */
|
| 215 |
+
.run{border:0;background:var(--grit);color:#140a06;font-family:var(--mono);font-weight:600;font-size:13px;letter-spacing:.14em;text-transform:uppercase;padding:0 24px;cursor:pointer;transition:.16s;box-shadow:-1px 0 0 var(--grit-dim)}
|
| 216 |
+
.run:hover{background:var(--grit2);box-shadow:0 0 26px -4px rgba(255,90,42,.55)}
|
| 217 |
+
.run:disabled{opacity:.55;cursor:default;box-shadow:none}
|
| 218 |
+
.btn{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:3px;background:var(--grit);color:#140a06;font-family:var(--mono);font-weight:600;font-size:13px;letter-spacing:.1em;text-transform:uppercase;padding:12px 22px;cursor:pointer;transition:.16s}
|
| 219 |
+
.btn:hover{background:var(--grit2);box-shadow:0 0 26px -4px rgba(255,90,42,.55)}
|
| 220 |
+
.btn.ghost{background:transparent;color:var(--dim);border:1px solid var(--line2)}
|
| 221 |
+
.btn.ghost:hover{color:var(--grit);border-color:var(--grit-dim);background:transparent;box-shadow:none}
|
| 222 |
+
|
| 223 |
+
/* ---- chips / controls ---- */
|
| 224 |
+
.chip{font-family:var(--mono);font-size:12px;color:var(--dim);background:var(--panel);border:1px solid var(--line);border-radius:2px;padding:8px 11px;cursor:pointer;transition:.15s}
|
| 225 |
+
.chip:hover{color:var(--grit);border-color:var(--grit-dim)}
|
| 226 |
+
.chip .pt{color:var(--dim2);margin-right:7px}
|
| 227 |
+
select,.select{padding:10px 12px;border:1px solid var(--line2);border-radius:3px;background:var(--panel);color:var(--ink);font-family:var(--mono);font-size:13px;outline:none;cursor:pointer}
|
| 228 |
+
select:focus{border-color:var(--grit-dim)}
|
| 229 |
+
label.lbl{font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.24em;color:var(--dim2);display:block;margin-bottom:6px}
|
| 230 |
+
|
| 231 |
+
/* ---- mono log / trace rows ---- */
|
| 232 |
+
.log{font-family:var(--mono);font-size:13px;line-height:1.75}
|
| 233 |
+
.row{display:grid;grid-template-columns:22px auto 1fr;gap:0 12px;padding:13px 18px;border-bottom:1px solid var(--line)}
|
| 234 |
+
.row:last-child{border-bottom:0}
|
| 235 |
+
.row .mk{color:var(--grit);font-weight:600}
|
| 236 |
+
.row .tn{color:var(--grit2);text-transform:uppercase;letter-spacing:.06em;font-weight:500}
|
| 237 |
+
.row .rd{color:var(--ink);word-break:break-word}.row .rd .arg{color:var(--dim2)}
|
| 238 |
+
|
| 239 |
+
/* ---- tables ---- */
|
| 240 |
+
table{width:100%;border-collapse:collapse;font-size:13.5px}
|
| 241 |
+
th{text-align:left;font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--dim2);font-weight:500;padding:11px 14px;border-bottom:1px solid var(--line2);background:var(--bg2)}
|
| 242 |
+
td{padding:11px 14px;border-bottom:1px solid var(--line);vertical-align:top}
|
| 243 |
+
tr:last-child td{border-bottom:0}
|
| 244 |
+
.tablewrap{border:1px solid var(--line);border-radius:3px;overflow:hidden;overflow-x:auto}
|
| 245 |
+
|
| 246 |
+
/* ---- chat bubbles ---- */
|
| 247 |
+
.msg{max-width:78%;padding:12px 15px;border-radius:3px;font-size:15px;line-height:1.55;margin-bottom:12px}
|
| 248 |
+
.msg.user{margin-left:auto;background:var(--panel2);border:1px solid var(--line2)}
|
| 249 |
+
.msg.bot{background:var(--panel);border:1px solid var(--line);border-left:2px solid var(--grit)}
|
| 250 |
+
|
| 251 |
+
/* ---- badges / pills ---- */
|
| 252 |
+
.badge{display:inline-block;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.06em;padding:3px 9px;border-radius:2px;border:1px solid var(--line2);color:var(--dim)}
|
| 253 |
+
.badge.on{color:var(--grit);border-color:var(--grit-dim)}
|
| 254 |
+
.hl{color:var(--grit);font-weight:600;font-family:var(--mono)}
|
| 255 |
+
|
| 256 |
+
/* ---- answer/output prose ---- */
|
| 257 |
+
.prose{font-size:16px;line-height:1.65}.prose p{margin:0 0 12px}.prose p:last-child{margin-bottom:0}.prose b{color:var(--ink)}
|
| 258 |
+
|
| 259 |
+
/* ---- spinner ---- */
|
| 260 |
+
.spin{display:inline-flex;gap:6px;padding:16px 18px}.spin span{width:8px;height:8px;border-radius:50%;background:var(--grit);opacity:.5;animation:bd 1.2s infinite}
|
| 261 |
+
.spin span:nth-child(2){animation-delay:.18s}.spin span:nth-child(3){animation-delay:.36s}
|
| 262 |
+
|
| 263 |
+
/* ---- footer ---- */
|
| 264 |
+
footer{margin-top:34px;padding-top:16px;border-top:1px solid var(--line);font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--dim2);display:flex;gap:16px;flex-wrap:wrap;animation:fade .6s .5s both}
|
| 265 |
+
footer .b{color:var(--dim)}footer .sp{margin-left:auto}
|
| 266 |
+
footer a{color:var(--dim);text-decoration:none}footer a:hover{color:var(--grit)}
|
| 267 |
+
|
| 268 |
+
/* ---- reveal animations ---- */
|
| 269 |
+
@keyframes fade{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
|
| 270 |
+
@keyframes slidein{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:none}}
|
| 271 |
+
@keyframes bd{0%,60%,100%{transform:translateY(0);opacity:.35}30%{transform:translateY(-6px);opacity:1}}
|
| 272 |
+
.rvl{animation:fade .6s both}
|
| 273 |
+
|
| 274 |
+
/* ---- app-specific glue (Text Summarizer 30-in-15 #2) ---- */
|
| 275 |
+
textarea.ta{min-height:170px}
|
| 276 |
+
.orlink{font-family:var(--mono);font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--dim2);text-align:center;margin:16px 0}
|
| 277 |
+
.controls{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch;justify-content:space-between;margin-top:6px}
|
| 278 |
+
.seg{display:inline-flex;gap:8px;flex-wrap:wrap}
|
| 279 |
+
.chip.on{color:var(--grit);border-color:var(--grit-dim);background:var(--panel2)}
|
| 280 |
+
.controls .run{padding:12px 26px}
|
| 281 |
+
.out{display:none}
|
| 282 |
+
.out.show{display:block;animation:fade .5s both}
|
| 283 |
+
.out .sec .btn{padding:7px 15px}
|
| 284 |
+
#result{white-space:pre-wrap;min-height:22px}
|
| 285 |
</style></head>
|
| 286 |
+
<body><div class="wrap">
|
| 287 |
+
<header>
|
| 288 |
+
<span class="mark"><svg width="38" height="38" viewBox="0 0 38 38" fill="none"><rect x="1" y="1" width="36" height="36" rx="2" stroke="#2b303c"/><path d="M27 12.5A9 9 0 1 0 28 22H19" stroke="#ff5a2a" stroke-width="2.4" stroke-linecap="square"/><rect x="10.5" y="10.5" width="3" height="3" fill="#ff5a2a"/></svg></span>
|
| 289 |
+
<span class="brand"><span class="co">GRIT<b>AI</b></span><span class="sub">Text Summarizer</span></span>
|
| 290 |
+
<span class="tags"><span class="tag hot">▸ Live</span><span class="tag">SDVOSB</span><span class="tag">Lawton OK</span></span>
|
| 291 |
+
</header>
|
| 292 |
+
<section class="hero">
|
| 293 |
+
<h1>Get the <em>gist</em> in seconds.</h1>
|
| 294 |
+
<p>Paste an article, email, or notes — or drop in a link — and get a faithful TL;DR with the key points, streamed live.</p>
|
| 295 |
+
</section>
|
| 296 |
+
<div class="sec"><span class="num">01</span><span class="name">Source</span><span class="rule"></span></div>
|
| 297 |
+
<textarea id="src" class="ta" placeholder="Paste text here…"></textarea>
|
| 298 |
+
<div class="orlink">— or summarize a link —</div>
|
| 299 |
+
<div class="field"><span class="car">›</span><input id="url" placeholder="https://…" autocomplete="off"></div>
|
| 300 |
+
<div class="sec"><span class="num">02</span><span class="name">Length</span><span class="rule"></span></div>
|
| 301 |
+
<div class="controls">
|
| 302 |
+
<div class="seg" id="seg">
|
| 303 |
+
<button class="chip" data-v="brief">Brief</button>
|
| 304 |
+
<button class="chip on" data-v="standard">Standard</button>
|
| 305 |
+
<button class="chip" data-v="detailed">Detailed</button>
|
| 306 |
</div>
|
| 307 |
+
<button class="run" id="go" onclick="run()">Summarize</button>
|
| 308 |
</div>
|
| 309 |
<div class="out" id="out">
|
| 310 |
+
<div class="sec"><span class="num">03</span><span class="name">Summary</span><span class="rule"></span><button class="btn ghost" id="copy" onclick="copyOut()" style="display:none">Copy</button></div>
|
| 311 |
+
<div class="card accent"><div id="result" class="prose"></div></div>
|
| 312 |
</div>
|
| 313 |
+
<footer>
|
| 314 |
+
<span class="b">Faithful summaries · your text isn't stored</span>
|
| 315 |
+
<span class="sp">GRITAI SOLUTIONS · 30-in-15 №2</span>
|
| 316 |
+
</footer>
|
| 317 |
</div><script>
|
| 318 |
let length="standard",busy=false;
|
| 319 |
const src=document.getElementById('src'),url=document.getElementById('url'),go=document.getElementById('go'),
|
|
|
|
| 324 |
async function run(){if(busy)return;const text=src.value.trim(),u=url.value.trim();
|
| 325 |
if(!text&&!u){src.focus();return;}
|
| 326 |
busy=true;go.disabled=true;go.textContent='Summarizing…';out.classList.add('show');copy.style.display='none';
|
| 327 |
+
result.innerHTML='<span class="spin"><span></span><span></span><span></span></span>';
|
| 328 |
let full='';
|
| 329 |
try{
|
| 330 |
const r=await fetch('/api/summarize',{method:'POST',headers:{'Content-Type':'application/json'},
|