Spaces:
Running
Running
Deploy from anycoder - index.html
Browse files- index.html +71 -21
index.html
CHANGED
|
@@ -1,29 +1,79 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
-
<meta charset="UTF-8"
|
| 6 |
-
<
|
| 7 |
-
|
| 8 |
-
<
|
| 9 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
</head>
|
| 11 |
-
|
| 12 |
<body>
|
| 13 |
-
<
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
</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>Gemma Chatbot - Transformers.js</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 9 |
+
<script type="module">
|
| 10 |
+
import { pipeline, TextStreamer } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.3';
|
| 11 |
+
window.pipeline = pipeline;
|
| 12 |
+
window.TextStreamer = TextStreamer;
|
| 13 |
+
</script>
|
| 14 |
</head>
|
|
|
|
| 15 |
<body>
|
| 16 |
+
<div class="app-container">
|
| 17 |
+
<header class="header">
|
| 18 |
+
<div class="header-content">
|
| 19 |
+
<h1 class="logo">
|
| 20 |
+
<span class="logo-icon">🤖</span>
|
| 21 |
+
Gemma Chatbot
|
| 22 |
+
</h1>
|
| 23 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-badge" rel="noopener noreferrer">
|
| 24 |
+
Built with <strong>anycoder</strong>
|
| 25 |
+
</a>
|
| 26 |
+
</div>
|
| 27 |
+
<div class="device-selector">
|
| 28 |
+
<label class="device-toggle">
|
| 29 |
+
<input type="checkbox" id="device-toggle" />
|
| 30 |
+
<span class="toggle-switch"></span>
|
| 31 |
+
<span class="toggle-labels">
|
| 32 |
+
<span>CPU</span>
|
| 33 |
+
<span>GPU (WebGPU)</span>
|
| 34 |
+
</span>
|
| 35 |
+
</label>
|
| 36 |
+
</div>
|
| 37 |
+
</header>
|
| 38 |
|
| 39 |
+
<main class="main-content">
|
| 40 |
+
<div class="chat-container" id="chatContainer">
|
| 41 |
+
<div class="welcome-message">
|
| 42 |
+
<div class="avatar assistant-avatar">🤖</div>
|
| 43 |
+
<div class="message assistant-message">
|
| 44 |
+
<div class="message-content">
|
| 45 |
+
Hello! I'm powered by Gemma-3-270M. Ask me anything!
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
|
| 51 |
+
<div class="input-container">
|
| 52 |
+
<div class="input-wrapper">
|
| 53 |
+
<div class="avatar user-avatar">👤</div>
|
| 54 |
+
<div class="input-group">
|
| 55 |
+
<textarea
|
| 56 |
+
id="messageInput"
|
| 57 |
+
placeholder="Type your message here..."
|
| 58 |
+
rows="1"
|
| 59 |
+
maxlength="1000"
|
| 60 |
+
></textarea>
|
| 61 |
+
<button id="sendButton" class="send-button" disabled>
|
| 62 |
+
<span class="send-icon">➤</span>
|
| 63 |
+
</button>
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
</main>
|
| 68 |
+
|
| 69 |
+
<div class="status-bar" id="statusBar">
|
| 70 |
+
<div class="status-indicator" id="statusIndicator">
|
| 71 |
+
<span class="status-text">Ready</span>
|
| 72 |
+
<div class="status-dots" id="statusDots"></div>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<script type="module" src="index.js"></script>
|
| 78 |
+
</body>
|
| 79 |
</html>
|