File size: 1,928 Bytes
aab0173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Pi CLI Web</title>
  </head>
  <body>
    <main id="app">
      <header class="runtime-bar" aria-label="Runtime status">
        <div>
          <h1>pi</h1>
          <p id="model-label"></p>
        </div>
        <div class="status-stack">
          <span class="status" id="status">Idle</span>
          <span class="status" id="model-status">Model idle</span>
          <span class="status" id="sandbox-status">Sandbox idle</span>
        </div>
      </header>

      <section class="terminal-shell" aria-label="Pi terminal">
        <div id="terminal"></div>
      </section>

      <section class="model-gate" id="model-gate" aria-labelledby="model-gate-title" aria-modal="true" role="dialog">
        <div class="model-dialog">
          <div>
            <p class="eyebrow">Local model setup</p>
            <h2 id="model-gate-title">Download the selected model to this browser?</h2>
            <p class="dialog-copy">
              This static web port runs pi with Transformers.js and WebContainers. The model download stays in browser storage when possible.
            </p>
          </div>
          <div class="dialog-actions">
            <button id="confirm-load-model" type="button">Download Model</button>
            <button id="use-test-model" type="button">Use Test Model</button>
          </div>
          <div class="dialog-options">
            <label>
              Device
              <select id="gate-device">
                <option value="webgpu">WebGPU</option>
                <option value="wasm">WASM</option>
              </select>
            </label>
            <p id="gate-status">Ready.</p>
          </div>
        </div>
      </section>
    </main>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>