Spaces:
Running
Running
Download index.html from webml-community/Qwen4-WebGPU: direct link, hf CLI and curl.
- Browser
- Download file 5.33 kB
-
https://huggingface.co/spaces/webml-community/Qwen4-WebGPU/resolve/main/index.html
- Command line
-
hf download hf://spaces/webml-community/Qwen4-WebGPU/index.html
-
curl -L -o index.html https://huggingface.co/spaces/webml-community/Qwen4-WebGPU/resolve/main/index.html
5.33 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width,initial-scale=1" /> | |
| <meta name="theme-color" content="#000000" /> | |
| <meta | |
| name="description" | |
| content="Run Qwen 4 locally in your browser with WebGPU." | |
| /> | |
| <style>html{background:#000}.hero:not([data-ready]){visibility:hidden;opacity:0}</style> | |
| <title>Qwen 4 WebGPU</title> | |
| <link rel="icon" href="./assets/qwen.svg" /> | |
| <link | |
| rel="preload" | |
| as="font" | |
| type="font/woff2" | |
| href="./assets/geist.woff2" | |
| crossorigin | |
| /> | |
| <link rel="stylesheet" href="./_shared/chat-page.css" /> | |
| <link rel="stylesheet" href="./style.css" /> | |
| <link rel="stylesheet" href="./model-panel.css" /> | |
| <link rel="stylesheet" href="./chat.css" /> | |
| </head> | |
| <body> | |
| <main class="hero" aria-labelledby="crystal-title"> | |
| <div class="visual" aria-hidden="true"> | |
| <canvas id="scene"></canvas> | |
| </div> | |
| <section inert id="model-panel" aria-labelledby="crystal-title"> | |
| <h1 id="crystal-title"> | |
| <img | |
| src="./assets/flare-wordmark.svg" | |
| alt="Qwen 4" | |
| width="1000" | |
| height="263" | |
| /> | |
| <canvas id="title-flare" aria-hidden="true"></canvas> | |
| </h1> | |
| <p class="model-intro"> | |
| Run Qwen 4 locally in your browser with WebGPU. | |
| </p> | |
| <div class="model-controls"> | |
| <div id="model-selection"> | |
| <div class="model-labels"> | |
| <label for="model-quant">Model</label> | |
| <button type="button" id="addons-open" aria-haspopup="dialog"> | |
| Add-ons | |
| </button> | |
| </div> | |
| <div class="model-select-wrap"> | |
| <select id="model-quant" aria-describedby="model-size"></select> | |
| <svg viewBox="0 0 16 16" aria-hidden="true"> | |
| <path d="m4 6 4 4 4-4" /> | |
| </svg> | |
| </div> | |
| <div class="model-action-row"> | |
| <button type="button" id="model-load"> | |
| Load model | |
| <span id="model-size"></span> | |
| </button> | |
| </div> | |
| <p class="model-note" id="model-note" role="status" hidden></p> | |
| </div> | |
| <div id="model-transfer" hidden> | |
| <div class="transfer-heading"> | |
| <span id="transfer-phase" role="status"></span> | |
| <span id="transfer-value"></span> | |
| <button | |
| type="button" | |
| id="transfer-back" | |
| aria-label="Cancel loading" | |
| title="Cancel loading" | |
| > | |
| <svg | |
| aria-hidden="true" | |
| width="14" | |
| height="14" | |
| viewBox="0 0 16 16" | |
| fill="none" | |
| stroke="currentColor" | |
| stroke-width="1.5" | |
| > | |
| <path d="m4 4 8 8m0-8-8 8" /> | |
| </svg> | |
| </button> | |
| </div> | |
| <div | |
| class="transfer-meter" | |
| role="progressbar" | |
| aria-label="Model loading" | |
| aria-valuemin="0" | |
| aria-valuemax="100" | |
| > | |
| <span></span> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <section id="chat" aria-label="Chat with Qwen 4" hidden> | |
| <header class="chat-head"> | |
| <div class="chat-head-inner"> | |
| <div class="chat-brand"> | |
| <img src="./assets/qwen.svg" alt="" width="22" height="22" /> | |
| <span class="chat-model">Qwen4-35B-A3B</span> | |
| <span class="chat-quant" id="chat-quant"></span> | |
| </div> | |
| <div class="status" id="status"> | |
| <span class="status-dot"></span> | |
| <span class="status-text" id="statusText">Ready · on-device</span> | |
| </div> | |
| <div class="chat-head-actions"> | |
| <button class="head-btn" id="kernelsBtn" type="button">Kernels</button> | |
| <button class="head-btn" id="clearBtn" type="button" disabled>New chat</button> | |
| </div> | |
| </div> | |
| </header> | |
| <div class="thread-scroll" id="threadScroll"> | |
| <div class="thread" id="thread"></div> | |
| </div> | |
| <footer class="composer-wrap"> | |
| <div class="composer" id="composer"> | |
| <div class="attachments" id="attachments" hidden></div> | |
| <div class="field"> | |
| <button class="icon-button attach-button" id="attachBtn" type="button" aria-label="Attach images" title="Attach images (or paste / drop them)" disabled> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="2.5" /><circle cx="9" cy="10" r="1.8" /><path d="m21 16-5.2-5.2a1.5 1.5 0 0 0-2.1 0L5 19.5" /></svg> | |
| </button> | |
| <textarea id="input" rows="1" placeholder="Loading…" disabled></textarea> | |
| <button class="think-toggle" id="thinkBtn" type="button" aria-pressed="true" title="Reason before answering" disabled>Think</button> | |
| <button class="icon-button send-button" id="sendBtn" type="button" disabled aria-label="Send message"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14" /><path d="m13 6 6 6-6 6" /></svg> | |
| </button> | |
| <button class="icon-button stop-button" id="stopBtn" type="button" aria-label="Stop generation"> | |
| <svg viewBox="0 0 24 24" fill="currentColor"><rect x="7" y="7" width="10" height="10" rx="1.5" /></svg> | |
| </button> | |
| </div> | |
| <input id="fileInput" type="file" accept="image/*" multiple hidden /> | |
| <div class="composer-meta"> | |
| <span id="hint">Runs fully on-device — prompts and images never leave your machine</span> | |
| <span id="liveStat"></span> | |
| </div> | |
| </div> | |
| </footer> | |
| </section> | |
| <dialog id="addons" aria-labelledby="addons-title"> | |
| <div class="dialog-head"> | |
| <span class="dialog-kicker">Qwen4-35B-A3B</span> | |
| <button id="addons-close" class="close" aria-label="Close add-ons"> | |
| × | |
| </button> | |
| </div> | |
| <h2 id="addons-title">Model add-ons</h2> | |
| <div class="model-labels"> | |
| <label for="model-projector">Vision projector</label> | |
| </div> | |
| <div class="model-select-wrap"> | |
| <select id="model-projector"></select> | |
| <svg viewBox="0 0 16 16" aria-hidden="true"> | |
| <path d="m4 6 4 4 4-4" /> | |
| </svg> | |
| </div> | |
| <div class="model-action-row"> | |
| <button type="button" id="addons-done">Done</button> | |
| <span id="addons-total"></span> | |
| </div> | |
| </dialog> | |
| <script type="module" src="./app.js"></script> | |
| </body> | |
| </html> | |