kaushik-harsh-99's picture
Upload WebGPU / WASM app with GGUF models (model_f16.gguf and model_q8_0.gguf)
d376ead verified
Raw
History Blame Contribute Delete
5.75 kB
<!DOCTYPE html>
<html lang="hi">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simple Stories Hindi 20M – In-Browser AI</title>
<meta name="description" content="Run a 20M parameter Hindi language model entirely in your browser. No server, no API key. Powered by llama.cpp WebAssembly." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="app-layout">
<!-- Header -->
<header class="header">
<div class="header-main">
<h1 class="title">Simple Stories Hindi <span>20M</span></h1>
<p class="subtitle">Runs 100% in your browser · No server · <a href="https://huggingface.co/SmallScale/Simple-Stories-Hindi-20M" target="_blank" rel="noopener">Model</a></p>
</div>
<div id="deviceBadge" class="badge idle">Ready</div>
</header>
<!-- Playground Workspace -->
<main class="workspace">
<!-- Prompt -->
<section class="section">
<div class="section-label-row">
<label for="promptInput" class="section-label">Prompt (हिंदी संकेत)</label>
<div class="sample-prompts">
<span class="sample-label">Try:</span>
<button class="sample-btn" data-prompt="एक समय की बात है, एक छोटी लड़की">लड़की की कहानी</button>
<button class="sample-btn" data-prompt="एक जंगल में जहाँ पेड़ों ने रहस्यों को फुसफुसाया">जंगल का रहस्य</button>
<button class="sample-btn" data-prompt="एक छोटे से गाँव में एक समझदार लड़का रहता था">गाँव का लड़का</button>
</div>
</div>
<textarea id="promptInput" rows="3" placeholder="कहानी की शुरुआत लिखें...">एक समय की बात है, एक छोटी लड़की</textarea>
</section>
<!-- Single control: Temperature -->
<section class="controls-row">
<div class="control-item">
<div class="control-header">
<label for="temperature">Creativity (रचनात्मकता)</label>
<span id="tempValue" class="val-tag">0.70</span>
</div>
<input type="range" id="temperature" min="0.0" max="1.2" step="0.05" value="0.70" />
<span class="control-subtext">Low = focused &nbsp;·&nbsp; High = creative</span>
</div>
</section>
<!-- Action Bar -->
<div class="action-bar">
<div class="action-left">
<button id="generateBtn" class="btn btn-primary">
<span id="generateBtnText">Generate</span>
</button>
<button id="stopBtn" class="btn btn-secondary" disabled>Stop</button>
</div>
<div class="action-right">
<button id="copyBtn" class="btn btn-subtle">Copy</button>
<button id="clearBtn" class="btn btn-subtle">Clear</button>
</div>
</div>
<!-- Output Box -->
<section class="output-section">
<div class="output-header">
<span class="section-label">Output (कहानी)</span>
<span id="statusText" class="status-text"></span>
</div>
<!-- Progress Overlay (shown during model download) -->
<div id="progressOverlay" class="progress-overlay hidden">
<div class="progress-inner">
<div class="progress-icon"></div>
<div class="progress-label" id="progressLabel">Downloading model…</div>
<div class="progress-track">
<div class="progress-fill" id="progressFill"></div>
</div>
<div class="progress-pct" id="progressPct">0%</div>
<div class="progress-sub" id="progressSub">FP16 · 43 MB · first run only</div>
</div>
</div>
<div id="outputBox" class="output-box">
<span class="placeholder-text">आपकी कहानी यहाँ दिखाई देगी…</span>
</div>
<div class="stats-bar">
<span id="promptTokenMetric" class="stat"></span>
<span class="stat-sep">·</span>
<span id="generatedTokenMetric" class="stat"></span>
<span class="stat-sep">·</span>
<span id="speedMetric" class="stat"></span>
<span class="stat-sep">·</span>
<span id="timeMetric" class="stat"></span>
</div>
</section>
</main>
</div>
<script src="index.js" type="module"></script>
</body>
</html>