Own tab icon, neutral palette, gentler row hover, status pill, step rail with a measured estimate
Browse files- favicon.ico +0 -0
- icon-180.png +0 -0
- icon-32.png +0 -0
- index.html +98 -36
- mark.svg +5 -0
favicon.ico
DELETED
|
Binary file (2.77 kB)
|
|
|
icon-180.png
ADDED
|
|
icon-32.png
ADDED
|
|
index.html
CHANGED
|
@@ -19,18 +19,20 @@
|
|
| 19 |
<meta name="twitter:description" content="Remove motion blur from photos. Full resolution, uncompressed, free.">
|
| 20 |
<meta name="twitter:image" content="https://shafi99-deblur.static.hf.space/og.jpg">
|
| 21 |
<link rel="manifest" href="manifest.webmanifest">
|
| 22 |
-
<link rel="icon" href="
|
|
|
|
| 23 |
<link rel="icon" href="icon-192.png" type="image/png" sizes="192x192">
|
| 24 |
-
<link rel="apple-touch-icon" href="icon-
|
| 25 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 26 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 27 |
<link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,300;1,6..72,400;1,6..72,500&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 28 |
<style>
|
| 29 |
:root{
|
| 30 |
-
--paper:#
|
| 31 |
-
--rule:#
|
| 32 |
-
--on-ink:#
|
| 33 |
-
--
|
|
|
|
| 34 |
--serif:"Newsreader",Georgia,"Times New Roman",serif;
|
| 35 |
--sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
|
| 36 |
--measure:760px; --wide:900px;
|
|
@@ -38,10 +40,11 @@
|
|
| 38 |
}
|
| 39 |
@media (prefers-color-scheme:dark){
|
| 40 |
:root{
|
| 41 |
-
--paper:#
|
| 42 |
-
--rule:#
|
| 43 |
-
--on-ink:#
|
| 44 |
-
--
|
|
|
|
| 45 |
}
|
| 46 |
}
|
| 47 |
*{box-sizing:border-box}
|
|
@@ -65,12 +68,22 @@ header::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;ba
|
|
| 65 |
@keyframes draw{to{transform:scaleX(1)}}
|
| 66 |
.mark{font:700 clamp(1.75rem,3.4vw,2.125rem)/1 var(--serif);letter-spacing:-.035em}
|
| 67 |
.mark i{font-style:italic;color:var(--accent)}
|
| 68 |
-
.status{font:
|
| 69 |
-
display:inline-flex;align-items:center;gap:
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
.dot
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
.masthead{max-width:none}
|
| 76 |
@media (min-width:620px){ h1{white-space:nowrap} }
|
|
@@ -160,12 +173,23 @@ button,a.btn{font:inherit;color:inherit}
|
|
| 160 |
@keyframes pull{from{filter:blur(7px)}to{filter:blur(.4px)}}
|
| 161 |
@keyframes sweep{from{background-position:130% 0}to{background-position:-130% 0}}
|
| 162 |
|
| 163 |
-
.progress{height:
|
|
|
|
| 164 |
.progress>i{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}
|
| 165 |
.progress.indet>i{width:28%;animation:slide 1.3s var(--ease) infinite}
|
| 166 |
@keyframes slide{from{margin-left:-28%}to{margin-left:100%}}
|
| 167 |
.msg{min-height:1.5em;margin:12px 0 0;color:var(--muted);font:400 .875rem/1.6 var(--sans);
|
| 168 |
font-variant-numeric:tabular-nums}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
.msg.err{color:var(--accent)}
|
| 170 |
.bar{display:none;flex-wrap:wrap;gap:10px;margin-top:18px;align-items:center}
|
| 171 |
.bar .sp{flex:1}
|
|
@@ -184,14 +208,16 @@ button,a.btn{font:inherit;color:inherit}
|
|
| 184 |
stroke-linecap:round;stroke-linejoin:round;
|
| 185 |
transition:stroke .26s var(--ease),transform .34s var(--ease)}
|
| 186 |
.ref .rb{display:block;transition:transform .34s var(--ease)}
|
| 187 |
-
/*
|
| 188 |
-
|
| 189 |
-
.ref
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
.ref:hover .rb{transform:translateX(7px)}
|
| 191 |
-
.ref:hover .ic svg{stroke:var(--accent
|
| 192 |
-
.ref:hover .
|
| 193 |
-
.ref:hover .rt{color:var(--on-ink)}
|
| 194 |
-
.ref:hover .rd{color:var(--on-ink-dim)}
|
| 195 |
.rk{font:700 .625rem/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--accent);
|
| 196 |
transition:color .26s var(--ease)}
|
| 197 |
.rt{display:block;margin:7px 0 4px;font:600 1.125rem/1.4 var(--serif);letter-spacing:-.012em;
|
|
@@ -300,6 +326,11 @@ button,a.btn{font:inherit;color:inherit}
|
|
| 300 |
</div>
|
| 301 |
|
| 302 |
<div class="progress" id="progress"><i id="progressFill"></i></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
<p class="msg" id="msg"></p>
|
| 304 |
|
| 305 |
<div class="bar" id="bar">
|
|
@@ -384,10 +415,26 @@ const FN = "restore_image";
|
|
| 384 |
const $ = id => document.getElementById(id);
|
| 385 |
const els = {drop:$("drop"),file:$("file"),viewer:$("viewer"),stage:$("stage"),before:$("imgBefore"),after:$("imgAfter"),
|
| 386 |
map:$("map"),divider:$("divider"),knob:$("knob"),bar:$("bar"),msg:$("msg"),progress:$("progress"),fill:$("progressFill"),
|
| 387 |
-
dl:$("dl"),dot:$("dot"),statusText:$("statusText"),mapBtn:$("mapBtn")
|
|
|
|
| 388 |
const CALM = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
|
|
|
|
|
| 389 |
|
| 390 |
-
function setStatus(kind, text){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 391 |
function say(text, err){ els.msg.textContent = text || ""; els.msg.classList.toggle("err", !!err); }
|
| 392 |
|
| 393 |
/* ---------- wake the model ---------- */
|
|
@@ -531,7 +578,7 @@ async function showPair(beforeUrl, afterUrl, dlName){
|
|
| 531 |
}
|
| 532 |
function resetToPicker(){
|
| 533 |
els.viewer.style.display = "none"; els.bar.style.display = "none"; els.drop.style.display = "flex";
|
| 534 |
-
els.progress.style.display = "none"; say(""); els.file.value = "";
|
| 535 |
}
|
| 536 |
$("newBtn").onclick = resetToPicker;
|
| 537 |
|
|
@@ -575,7 +622,14 @@ function upload(file, onProgress){
|
|
| 575 |
const fd = new FormData(); fd.append("files", file);
|
| 576 |
const x = new XMLHttpRequest();
|
| 577 |
x.open("POST", SPACE + "/gradio_api/upload"); x.timeout = 600000;
|
| 578 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 579 |
x.onload = () => {
|
| 580 |
if(x.status !== 200) return reject(new Error("The upload was refused. Try a smaller photo."));
|
| 581 |
try{ resolve(JSON.parse(x.responseText)[0]); }
|
|
@@ -637,23 +691,31 @@ async function handleFile(file){
|
|
| 637 |
V.W = w; V.H = h; V.p = 1; els.drop.style.display = "none"; els.viewer.style.display = "block";
|
| 638 |
els.bar.style.display = "none"; els.viewer.classList.add("working"); fit();
|
| 639 |
const t0 = performance.now(); let phase = "up";
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 644 |
els.fill.style.width = Math.round(3 + f*57) + "%";
|
| 645 |
-
if(f
|
|
|
|
|
|
|
|
|
|
| 646 |
});
|
| 647 |
-
phase = "work"; els.progress.classList.add("indet");
|
| 648 |
const {preview, full} = await runJob(serverPath);
|
| 649 |
-
els.progress.style.display = "none"; clearInterval(timer);
|
| 650 |
const name = (file.name.replace(/\.[^.]+$/, "") || "photo") + "-deblurred.png";
|
| 651 |
await showPair(beforeUrl, preview, name);
|
| 652 |
els.dl.href = full;
|
| 653 |
say(w + " × " + h + " · " + Math.round((performance.now()-t0)/1000) + "s");
|
| 654 |
serverReady = true; setStatus("ok", "Ready");
|
| 655 |
}catch(err){
|
| 656 |
-
clearInterval(timer); els.progress.style.display = "none";
|
|
|
|
| 657 |
}finally{ busy = false; }
|
| 658 |
}
|
| 659 |
els.file.addEventListener("change", e => handleFile(e.target.files[0]));
|
|
|
|
| 19 |
<meta name="twitter:description" content="Remove motion blur from photos. Full resolution, uncompressed, free.">
|
| 20 |
<meta name="twitter:image" content="https://shafi99-deblur.static.hf.space/og.jpg">
|
| 21 |
<link rel="manifest" href="manifest.webmanifest">
|
| 22 |
+
<link rel="icon" href="mark.svg" type="image/svg+xml">
|
| 23 |
+
<link rel="icon" href="icon-32.png" type="image/png" sizes="32x32">
|
| 24 |
<link rel="icon" href="icon-192.png" type="image/png" sizes="192x192">
|
| 25 |
+
<link rel="apple-touch-icon" href="icon-180.png">
|
| 26 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 27 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 28 |
<link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,300;1,6..72,400;1,6..72,500&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 29 |
<style>
|
| 30 |
:root{
|
| 31 |
+
--paper:#f7f7f6; --surface:#ffffff; --ink:#111113; --muted:#5d6166;
|
| 32 |
+
--rule:#e1e1df; --rule-soft:#ededeb; --accent:#c0391a; --accent-soft:#fbeae5;
|
| 33 |
+
--on-ink:#f7f7f6; --on-ink-dim:#a8acb0; --accent-lift:#ff8a62;
|
| 34 |
+
--ok:#2f7d55;
|
| 35 |
+
--stage:#111113;
|
| 36 |
--serif:"Newsreader",Georgia,"Times New Roman",serif;
|
| 37 |
--sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
|
| 38 |
--measure:760px; --wide:900px;
|
|
|
|
| 40 |
}
|
| 41 |
@media (prefers-color-scheme:dark){
|
| 42 |
:root{
|
| 43 |
+
--paper:#101113; --surface:#191b1d; --ink:#f2f3f4; --muted:#a3a8ad;
|
| 44 |
+
--rule:#2b2e31; --rule-soft:#212426; --accent:#ff8a62; --accent-soft:#2c1c16;
|
| 45 |
+
--on-ink:#101113; --on-ink-dim:#595e63; --accent-lift:#c0391a;
|
| 46 |
+
--ok:#4ab87c;
|
| 47 |
+
--stage:#08090a;
|
| 48 |
}
|
| 49 |
}
|
| 50 |
*{box-sizing:border-box}
|
|
|
|
| 68 |
@keyframes draw{to{transform:scaleX(1)}}
|
| 69 |
.mark{font:700 clamp(1.75rem,3.4vw,2.125rem)/1 var(--serif);letter-spacing:-.035em}
|
| 70 |
.mark i{font-style:italic;color:var(--accent)}
|
| 71 |
+
.status{font:600 .6875rem/1 var(--sans);letter-spacing:.1em;text-transform:uppercase;
|
| 72 |
+
display:inline-flex;align-items:center;gap:8px;white-space:nowrap;
|
| 73 |
+
padding:7px 13px;border-radius:999px;border:1px solid var(--rule);background:var(--surface);
|
| 74 |
+
color:var(--muted);transition:color .3s var(--ease),border-color .3s var(--ease),background .3s var(--ease)}
|
| 75 |
+
.dot{width:7px;height:7px;border-radius:50%;background:currentColor;flex:none;position:relative}
|
| 76 |
+
.dot::after{content:"";position:absolute;inset:0;border-radius:50%;background:currentColor;
|
| 77 |
+
opacity:0;animation:ripple 2s var(--ease) infinite}
|
| 78 |
+
.status.is-ok{color:var(--ok);border-color:color-mix(in srgb,var(--ok) 38%,transparent);
|
| 79 |
+
background:color-mix(in srgb,var(--ok) 9%,var(--surface))}
|
| 80 |
+
.status.is-wait{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 38%,transparent);
|
| 81 |
+
background:color-mix(in srgb,var(--accent) 9%,var(--surface))}
|
| 82 |
+
.status.is-bad{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 45%,transparent);
|
| 83 |
+
background:color-mix(in srgb,var(--accent) 12%,var(--surface))}
|
| 84 |
+
.status.is-wait .dot::after{animation-duration:1.1s}
|
| 85 |
+
.status.is-ok .dot::after{animation-duration:2.4s}
|
| 86 |
+
@keyframes ripple{0%{opacity:.55;transform:scale(1)}70%{opacity:0;transform:scale(3.1)}100%{opacity:0}}
|
| 87 |
|
| 88 |
.masthead{max-width:none}
|
| 89 |
@media (min-width:620px){ h1{white-space:nowrap} }
|
|
|
|
| 173 |
@keyframes pull{from{filter:blur(7px)}to{filter:blur(.4px)}}
|
| 174 |
@keyframes sweep{from{background-position:130% 0}to{background-position:-130% 0}}
|
| 175 |
|
| 176 |
+
.progress{height:2px;background:var(--rule);overflow:hidden;margin:18px 0 0;display:none;
|
| 177 |
+
border-radius:2px}
|
| 178 |
.progress>i{display:block;height:100%;width:0;background:var(--accent);transition:width .3s var(--ease)}
|
| 179 |
.progress.indet>i{width:28%;animation:slide 1.3s var(--ease) infinite}
|
| 180 |
@keyframes slide{from{margin-left:-28%}to{margin-left:100%}}
|
| 181 |
.msg{min-height:1.5em;margin:12px 0 0;color:var(--muted);font:400 .875rem/1.6 var(--sans);
|
| 182 |
font-variant-numeric:tabular-nums}
|
| 183 |
+
/* step rail, so the wait has a shape instead of a spinner */
|
| 184 |
+
.steps{display:none;gap:0;margin:14px 0 0;align-items:center;
|
| 185 |
+
font:600 .625rem/1 var(--sans);letter-spacing:.11em;text-transform:uppercase;color:var(--muted)}
|
| 186 |
+
.steps.on{display:flex}
|
| 187 |
+
.steps .st{display:inline-flex;align-items:center;gap:7px;opacity:.38;transition:opacity .3s var(--ease),color .3s var(--ease)}
|
| 188 |
+
.steps .st b{width:6px;height:6px;border-radius:50%;background:currentColor;display:block}
|
| 189 |
+
.steps .st.now{opacity:1;color:var(--accent)}
|
| 190 |
+
.steps .st.done{opacity:1;color:var(--ok)}
|
| 191 |
+
.steps .gap{flex:1;height:1px;background:var(--rule);margin:0 10px;min-width:16px}
|
| 192 |
+
.eta{color:var(--ink);font-weight:500}
|
| 193 |
.msg.err{color:var(--accent)}
|
| 194 |
.bar{display:none;flex-wrap:wrap;gap:10px;margin-top:18px;align-items:center}
|
| 195 |
.bar .sp{flex:1}
|
|
|
|
| 208 |
stroke-linecap:round;stroke-linejoin:round;
|
| 209 |
transition:stroke .26s var(--ease),transform .34s var(--ease)}
|
| 210 |
.ref .rb{display:block;transition:transform .34s var(--ease)}
|
| 211 |
+
/* a quiet tint and an edge, not a hard flip to black: a full inversion on every row
|
| 212 |
+
strobes the page as the pointer travels down the list */
|
| 213 |
+
.ref{position:relative}
|
| 214 |
+
.ref::before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:2px;background:var(--accent);
|
| 215 |
+
transform:scaleY(0);transform-origin:top;transition:transform .26s var(--ease)}
|
| 216 |
+
.ref:hover{background:var(--surface);border-color:var(--rule)}
|
| 217 |
+
.ref:hover::before{transform:scaleY(1)}
|
| 218 |
.ref:hover .rb{transform:translateX(7px)}
|
| 219 |
+
.ref:hover .ic svg{stroke:var(--accent);transform:translateX(2px)}
|
| 220 |
+
.ref:hover .rt{color:var(--accent)}
|
|
|
|
|
|
|
| 221 |
.rk{font:700 .625rem/1 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--accent);
|
| 222 |
transition:color .26s var(--ease)}
|
| 223 |
.rt{display:block;margin:7px 0 4px;font:600 1.125rem/1.4 var(--serif);letter-spacing:-.012em;
|
|
|
|
| 326 |
</div>
|
| 327 |
|
| 328 |
<div class="progress" id="progress"><i id="progressFill"></i></div>
|
| 329 |
+
<div class="steps" id="steps">
|
| 330 |
+
<span class="st" id="stUp"><b></b>Upload</span><span class="gap"></span>
|
| 331 |
+
<span class="st" id="stRun"><b></b>Restore</span><span class="gap"></span>
|
| 332 |
+
<span class="st" id="stDone"><b></b>Ready</span>
|
| 333 |
+
</div>
|
| 334 |
<p class="msg" id="msg"></p>
|
| 335 |
|
| 336 |
<div class="bar" id="bar">
|
|
|
|
| 415 |
const $ = id => document.getElementById(id);
|
| 416 |
const els = {drop:$("drop"),file:$("file"),viewer:$("viewer"),stage:$("stage"),before:$("imgBefore"),after:$("imgAfter"),
|
| 417 |
map:$("map"),divider:$("divider"),knob:$("knob"),bar:$("bar"),msg:$("msg"),progress:$("progress"),fill:$("progressFill"),
|
| 418 |
+
dl:$("dl"),dot:$("dot"),status:$("status"),statusText:$("statusText"),mapBtn:$("mapBtn"),
|
| 419 |
+
steps:$("steps"),stUp:$("stUp"),stRun:$("stRun"),stDone:$("stDone")};
|
| 420 |
const CALM = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
| 421 |
+
// Tile grid matches the server: 512 px tiles stepping 416 px, so the count shown is real.
|
| 422 |
+
function tilesAlong(d){ return d <= 512 ? 1 : Math.ceil((d - 512) / 416) + 1; }
|
| 423 |
|
| 424 |
+
function setStatus(kind, text){
|
| 425 |
+
els.dot.className = "dot " + kind;
|
| 426 |
+
els.status.className = "status is-" + (kind === "wait" ? "wait" : kind === "ok" ? "ok" : "bad");
|
| 427 |
+
els.statusText.textContent = text;
|
| 428 |
+
}
|
| 429 |
+
// Three steps rather than a spinner, so the wait has a shape.
|
| 430 |
+
function step(which){
|
| 431 |
+
const order = ["up", "run", "done"], el = {up:els.stUp, run:els.stRun, done:els.stDone};
|
| 432 |
+
els.steps.classList.toggle("on", !!which);
|
| 433 |
+
order.forEach((k, i) => {
|
| 434 |
+
el[k].className = "st" + (k === which ? " now" : (which && i < order.indexOf(which) ? " done" : ""));
|
| 435 |
+
});
|
| 436 |
+
}
|
| 437 |
+
function human(sec){ return sec < 60 ? Math.round(sec) + "s" : Math.floor(sec/60) + "m " + Math.round(sec%60) + "s"; }
|
| 438 |
function say(text, err){ els.msg.textContent = text || ""; els.msg.classList.toggle("err", !!err); }
|
| 439 |
|
| 440 |
/* ---------- wake the model ---------- */
|
|
|
|
| 578 |
}
|
| 579 |
function resetToPicker(){
|
| 580 |
els.viewer.style.display = "none"; els.bar.style.display = "none"; els.drop.style.display = "flex";
|
| 581 |
+
els.progress.style.display = "none"; step(null); say(""); els.file.value = "";
|
| 582 |
}
|
| 583 |
$("newBtn").onclick = resetToPicker;
|
| 584 |
|
|
|
|
| 622 |
const fd = new FormData(); fd.append("files", file);
|
| 623 |
const x = new XMLHttpRequest();
|
| 624 |
x.open("POST", SPACE + "/gradio_api/upload"); x.timeout = 600000;
|
| 625 |
+
const began = performance.now();
|
| 626 |
+
// the estimate comes from the bytes actually moved so far, not a guess
|
| 627 |
+
x.upload.onprogress = e => {
|
| 628 |
+
if(!e.lengthComputable) return;
|
| 629 |
+
const secs = (performance.now() - began) / 1000;
|
| 630 |
+
const left = secs > .8 && e.loaded ? (e.total - e.loaded) / (e.loaded / secs) : null;
|
| 631 |
+
onProgress(e.loaded / e.total, left, e.total);
|
| 632 |
+
};
|
| 633 |
x.onload = () => {
|
| 634 |
if(x.status !== 200) return reject(new Error("The upload was refused. Try a smaller photo."));
|
| 635 |
try{ resolve(JSON.parse(x.responseText)[0]); }
|
|
|
|
| 691 |
V.W = w; V.H = h; V.p = 1; els.drop.style.display = "none"; els.viewer.style.display = "block";
|
| 692 |
els.bar.style.display = "none"; els.viewer.classList.add("working"); fit();
|
| 693 |
const t0 = performance.now(); let phase = "up";
|
| 694 |
+
const tiles = tilesAlong(w) * tilesAlong(h);
|
| 695 |
+
step("up"); say("Uploading");
|
| 696 |
+
timer = setInterval(() => {
|
| 697 |
+
if(phase === "work")
|
| 698 |
+
say("Restoring " + tiles + (tiles > 1 ? " tiles" : " tile")
|
| 699 |
+
+ " \u00b7 " + human((performance.now()-t0)/1000));
|
| 700 |
+
}, 500);
|
| 701 |
+
const serverPath = await upload(file, (f, left, total) => {
|
| 702 |
els.fill.style.width = Math.round(3 + f*57) + "%";
|
| 703 |
+
if(f < 1)
|
| 704 |
+
say("Uploading " + (total/1e6).toFixed(1) + " MB"
|
| 705 |
+
+ (left != null ? " \u00b7 " + human(left) + " left" : ""));
|
| 706 |
+
if(f >= 1 && phase === "up"){ phase = "work"; els.progress.classList.add("indet"); step("run"); }
|
| 707 |
});
|
| 708 |
+
phase = "work"; els.progress.classList.add("indet"); step("run");
|
| 709 |
const {preview, full} = await runJob(serverPath);
|
| 710 |
+
els.progress.style.display = "none"; clearInterval(timer); step("done");
|
| 711 |
const name = (file.name.replace(/\.[^.]+$/, "") || "photo") + "-deblurred.png";
|
| 712 |
await showPair(beforeUrl, preview, name);
|
| 713 |
els.dl.href = full;
|
| 714 |
say(w + " × " + h + " · " + Math.round((performance.now()-t0)/1000) + "s");
|
| 715 |
serverReady = true; setStatus("ok", "Ready");
|
| 716 |
}catch(err){
|
| 717 |
+
clearInterval(timer); els.progress.style.display = "none"; step(null);
|
| 718 |
+
resetToPicker(); say(err.message || "Something went wrong.", true);
|
| 719 |
}finally{ busy = false; }
|
| 720 |
}
|
| 721 |
els.file.addEventListener("change", e => handleFile(e.target.files[0]));
|
mark.svg
ADDED
|
|