Spaces:
Running
Running
Download frontend/dashboard.html from iparaco/Virtual-LPU: direct link, hf CLI and curl.
- Browser
- Download file 4.19 kB
-
https://huggingface.co/spaces/iparaco/Virtual-LPU/resolve/refs%2Fpr%2F2/frontend/dashboard.html
- Command line
-
hf download hf://spaces/iparaco/Virtual-LPU@refs/pr/2/frontend/dashboard.html
-
curl -L -o dashboard.html https://huggingface.co/spaces/iparaco/Virtual-LPU/resolve/refs%2Fpr%2F2/frontend/dashboard.html
4.19 kB
| <html lang="fa" dir="rtl"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>LPU AI Accelerator — Dashboard</title> | |
| <style> | |
| :root { --bg:#0f1419; --panel:#161d26; --line:#232d3a; --txt:#d8dee9; | |
| --dim:#8b98a5; --ok:#34d399; --warn:#fbbf24; --err:#f87171; } | |
| * { box-sizing:border-box; margin:0; padding:0; } | |
| body { font-family:"Segoe UI",Tahoma,sans-serif; background:var(--bg); | |
| color:var(--txt); min-height:100vh; display:flex; flex-direction:column; } | |
| header { display:flex; align-items:center; gap:12px; flex-wrap:wrap; | |
| padding:14px 20px; border-bottom:1px solid var(--line); } | |
| header h1 { font-size:clamp(1rem, 3vw, 1.3rem); font-weight:600; } | |
| .pill { display:inline-flex; align-items:center; gap:8px; | |
| border:1px solid var(--line); border-radius:999px; | |
| padding:6px 14px; font-size:.85rem; background:var(--panel); } | |
| .dot { width:10px; height:10px; border-radius:50%; background:var(--dim); } | |
| .dot.running { background:var(--ok); box-shadow:0 0 8px var(--ok); } | |
| .dot.stopped { background:var(--err); } | |
| main { flex:1; padding:20px; display:grid; gap:16px; | |
| grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); | |
| max-width:1100px; width:100%; margin:0 auto; } | |
| .card { background:var(--panel); border:1px solid var(--line); | |
| border-radius:10px; padding:18px; } | |
| .card h2 { font-size:.95rem; color:var(--dim); margin-bottom:12px; } | |
| .kv { display:flex; justify-content:space-between; gap:10px; | |
| padding:7px 0; border-bottom:1px dashed var(--line); font-size:.9rem; } | |
| .kv:last-child { border-bottom:0; } | |
| .kv b { color:var(--txt); font-weight:600; } | |
| footer { padding:12px 20px; border-top:1px solid var(--line); | |
| color:var(--dim); font-size:.8rem; display:flex; flex-wrap:wrap; | |
| gap:8px; justify-content:space-between; } | |
| #conn { color:var(--warn); } | |
| @media (max-width:640px){ main{padding:12px;} .kv{font-size:.85rem;} } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <h1>LPU AI Accelerator</h1> | |
| <span class="pill"><span class="dot" id="dot"></span><span id="acc">Accelerator —</span></span> | |
| <span class="pill">Runtime <b id="ver">—</b></span> | |
| </header> | |
| <main> | |
| <section class="card"> | |
| <h2>وضعیت شتابدهنده (Accelerator)</h2> | |
| <div class="kv"><span>نسخهی رانتایم</span><b id="ver2">—</b></div> | |
| <div class="kv"><span>وضعیت شتابدهنده</span><b id="acc2">—</b></div> | |
| <div class="kv"><span>آخرین بهروزرسانی</span><b id="ts">—</b></div> | |
| </section> | |
| <section class="card"> | |
| <h2>راهنمای کنترل</h2> | |
| <div class="kv"><span>شروع دسکتاپ</span><b>LPU_Desktop.cmd</b></div> | |
| <div class="kv"><span>شروع سرور</span><b>LPU_Server.cmd</b></div> | |
| <div class="kv"><span>بررسی محیط</span><b>LPU_Check.cmd</b></div> | |
| </section> | |
| </main> | |
| <footer> | |
| <span id="conn">در حال اتصال…</span> | |
| <span>بستن این پنجره فقط همین اپ را میبندد؛ فرایند آموزش دستنخورده میماند.</span> | |
| </footer> | |
| <script> | |
| (function () { | |
| var els = ["dot","acc","ver","acc2","ver2","ts","conn"].reduce(function (m, id) { | |
| m[id] = document.getElementById(id); return m; }, {}); | |
| function render(s) { | |
| var running = s && s.accelerator_status === "running"; | |
| els.dot.className = "dot " + (running ? "running" : "stopped"); | |
| var st = running ? "در حال اجرا" : "متوقف"; | |
| els.acc.textContent = "Accelerator — " + st; | |
| els.acc2.textContent = st; | |
| els.ver.textContent = els.ver2.textContent = s && s.runtime_version || "—"; | |
| els.ts.textContent = new Date().toLocaleTimeString("fa-IR"); | |
| els.conn.textContent = ""; | |
| els.conn.id = "conn"; | |
| } | |
| function fail(e) { | |
| els.conn.textContent = "اتصال برقرار نشد: " + (e && e.message || e); | |
| els.dot.className = "dot"; | |
| } | |
| function poll() { | |
| fetch("/api/status").then(function (r) { return r.json(); }) | |
| .then(render).catch(fail); | |
| } | |
| poll(); | |
| setInterval(poll, 2000); | |
| })(); | |
| </script> | |
| </body> | |
| </html> | |