Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Gemma 3 Chatbot - Transformers.js</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <div class="app-container"> | |
| <header> | |
| <div class="header-content"> | |
| <h1><i class="fa-solid fa-robot"></i> Gemma 3 Chat</h1> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="attribution">Built with anycoder</a> | |
| </div> | |
| <div class="controls"> | |
| <div class="select-wrapper"> | |
| <label for="device-select"><i class="fa-solid fa-microchip"></i> Hardware:</label> | |
| <select id="device-select"> | |
| <option value="cpu">CPU (WASM)</option> | |
| <option value="webgpu">GPU (WebGPU)</option> | |
| </select> | |
| </div> | |
| <button id="reset-btn" title="Reset Chat"><i class="fa-solid fa-rotate-right"></i></button> | |
| </div> | |
| </header> | |
| <main id="chat-container"> | |
| <div class="welcome-message"> | |
| <h2>Hello!</h2> | |
| <p>I'm running <strong>Gemma-3-270m</strong> entirely in your browser using Transformers.js.</p> | |
| <p class="note">First message will take time to load the model.</p> | |
| </div> | |
| <!-- Messages will appear here --> | |
| </main> | |
| <div id="status-bar" class="hidden"> | |
| <div class="status-text">Loading model...</div> | |
| <div class="progress-container"> | |
| <div class="progress-bar" id="progress-bar"></div> | |
| </div> | |
| </div> | |
| <footer> | |
| <form id="chat-form"> | |
| <textarea id="user-input" placeholder="Type a message..." rows="1"></textarea> | |
| <button type="submit" id="send-btn" disabled><i class="fa-solid fa-paper-plane"></i></button> | |
| </form> | |
| </footer> | |
| </div> | |
| <script type="module" src="index.js"></script> | |
| </body> | |
| </html> |