Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +76 -18
index.html
CHANGED
|
@@ -1,19 +1,77 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>mara-small · in-browser</title>
|
| 7 |
+
<style>
|
| 8 |
+
:root { color-scheme: dark; }
|
| 9 |
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
| 10 |
+
body {
|
| 11 |
+
font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
|
| 12 |
+
background: #0b0e14; color: #e6e9ef; min-height: 100vh;
|
| 13 |
+
display: flex; justify-content: center; padding: 40px 16px;
|
| 14 |
+
}
|
| 15 |
+
.wrap { width: 100%; max-width: 760px; }
|
| 16 |
+
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
|
| 17 |
+
h1 span { color: #7aa2f7; }
|
| 18 |
+
p.sub { color: #8b93a7; font-size: 14px; margin: 6px 0 28px; }
|
| 19 |
+
label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #8b93a7; margin-bottom: 6px; }
|
| 20 |
+
textarea {
|
| 21 |
+
width: 100%; min-height: 72px; resize: vertical;
|
| 22 |
+
background: #131722; border: 1px solid #232a3b; border-radius: 10px;
|
| 23 |
+
color: #e6e9ef; padding: 12px 14px; font-size: 15px; line-height: 1.5;
|
| 24 |
+
}
|
| 25 |
+
textarea:focus { outline: none; border-color: #7aa2f7; }
|
| 26 |
+
.row { display: flex; gap: 16px; margin: 16px 0; flex-wrap: wrap; }
|
| 27 |
+
.row > div { flex: 1; min-width: 140px; }
|
| 28 |
+
input[type=range] { width: 100%; accent-color: #7aa2f7; }
|
| 29 |
+
.val { color: #7aa2f7; font-size: 13px; }
|
| 30 |
+
button {
|
| 31 |
+
background: #7aa2f7; color: #0b0e14; border: none; border-radius: 10px;
|
| 32 |
+
padding: 12px 28px; font-size: 15px; font-weight: 600; cursor: pointer;
|
| 33 |
+
}
|
| 34 |
+
button:hover { background: #92b4f8; }
|
| 35 |
+
button:disabled { opacity: 0.45; cursor: wait; }
|
| 36 |
+
.status { font-size: 13px; color: #8b93a7; margin-top: 10px; }
|
| 37 |
+
.status b { color: #9ece6a; }
|
| 38 |
+
.out {
|
| 39 |
+
margin-top: 24px; background: #131722; border: 1px solid #232a3b;
|
| 40 |
+
border-radius: 10px; padding: 18px 20px; white-space: pre-wrap;
|
| 41 |
+
font-size: 15px; line-height: 1.65; min-height: 120px; color: #cdd3e0;
|
| 42 |
+
}
|
| 43 |
+
.out:empty::before { content: "Your story appears here…"; color: #4a5265; }
|
| 44 |
+
footer { margin-top: 36px; font-size: 12px; color: #4a5265; }
|
| 45 |
+
footer a { color: #7aa2f7; text-decoration: none; }
|
| 46 |
+
</style>
|
| 47 |
+
</head>
|
| 48 |
+
<body>
|
| 49 |
+
<div class="wrap">
|
| 50 |
+
<h1>mara<span>-small</span></h1>
|
| 51 |
+
<p class="sub">24.6M parameter GPT trained from scratch on TinyStories. Runs entirely in your browser — no server, no GPU farm.</p>
|
| 52 |
+
|
| 53 |
+
<label for="prompt">Story starter</label>
|
| 54 |
+
<textarea id="prompt">Once upon a time, there was a little girl named Lily.</textarea>
|
| 55 |
+
|
| 56 |
+
<div class="row">
|
| 57 |
+
<div>
|
| 58 |
+
<label>Max new tokens</label>
|
| 59 |
+
<input type="range" id="maxtok" min="50" max="400" value="200" step="10">
|
| 60 |
+
<span class="val" id="maxtokv">200</span>
|
| 61 |
+
</div>
|
| 62 |
+
<div>
|
| 63 |
+
<label>Temperature</label>
|
| 64 |
+
<input type="range" id="temp" min="0.4" max="1.2" value="0.8" step="0.05">
|
| 65 |
+
<span class="val" id="tempv">0.80</span>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
|
| 69 |
+
<button id="go">Generate story</button>
|
| 70 |
+
<div class="status" id="status">loading model…</div>
|
| 71 |
+
<div class="out" id="out"></div>
|
| 72 |
+
|
| 73 |
+
<footer>base model: <a href="https://huggingface.co/jaswanthsanjay88/mara-small">jaswanthsanjay88/mara-small</a> · inference via onnxruntime-web (WebGPU → WASM fallback)</footer>
|
| 74 |
+
</div>
|
| 75 |
+
<script type="module" src="./app.js"></script>
|
| 76 |
+
</body>
|
| 77 |
</html>
|