Upload index.html with huggingface_hub
Browse files- index.html +59 -22
index.html
CHANGED
|
@@ -1,29 +1,66 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
-
<meta charset="UTF-8"
|
| 6 |
-
<
|
| 7 |
-
|
| 8 |
-
<
|
| 9 |
-
<title>Transformers.js - Object Detection</title>
|
| 10 |
</head>
|
| 11 |
-
|
| 12 |
<body>
|
| 13 |
-
<
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
<
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
</body>
|
| 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>AI Chat Assistant</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
|
|
|
| 8 |
</head>
|
|
|
|
| 9 |
<body>
|
| 10 |
+
<div class="container">
|
| 11 |
+
<header class="header">
|
| 12 |
+
<h1>AI Chat Assistant</h1>
|
| 13 |
+
<div class="settings">
|
| 14 |
+
<button id="settingsBtn" class="settings-btn" aria-label="Settings">⚙️</button>
|
| 15 |
+
<div id="settingsMenu" class="settings-menu hidden">
|
| 16 |
+
<label class="device-toggle">
|
| 17 |
+
<input type="checkbox" id="gpuToggle">
|
| 18 |
+
<span>Use GPU (WebGPU)</span>
|
| 19 |
+
</label>
|
| 20 |
+
<button id="clearChat" class="clear-btn">Clear Chat</button>
|
| 21 |
+
</div>
|
| 22 |
+
</div>
|
| 23 |
+
</header>
|
| 24 |
+
|
| 25 |
+
<div id="chatContainer" class="chat-container">
|
| 26 |
+
<div class="welcome-message">
|
| 27 |
+
<h2>Welcome! 👋</h2>
|
| 28 |
+
<p>I'm your AI assistant powered by Gemma. Ask me anything!</p>
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
|
| 32 |
+
<div class="input-container">
|
| 33 |
+
<div class="typing-indicator hidden" id="typingIndicator">
|
| 34 |
+
<span></span>
|
| 35 |
+
<span></span>
|
| 36 |
+
<span></span>
|
| 37 |
+
</div>
|
| 38 |
+
<form id="chatForm" class="chat-form">
|
| 39 |
+
<textarea
|
| 40 |
+
id="messageInput"
|
| 41 |
+
class="message-input"
|
| 42 |
+
placeholder="Type your message here..."
|
| 43 |
+
rows="1"
|
| 44 |
+
required
|
| 45 |
+
aria-label="Message input"
|
| 46 |
+
></textarea>
|
| 47 |
+
<button type="submit" class="send-btn" id="sendBtn" aria-label="Send message">
|
| 48 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 49 |
+
<path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/>
|
| 50 |
+
</svg>
|
| 51 |
+
</button>
|
| 52 |
+
</form>
|
| 53 |
+
</div>
|
| 54 |
+
|
| 55 |
+
<div id="loadingOverlay" class="loading-overlay">
|
| 56 |
+
<div class="loader">
|
| 57 |
+
<div class="loader-spinner"></div>
|
| 58 |
+
<p>Loading AI Model...</p>
|
| 59 |
+
<p class="loader-status" id="loaderStatus">This may take a moment on first load</p>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
|
| 64 |
+
<script type="module" src="index.js"></script>
|
| 65 |
</body>
|
|
|
|
| 66 |
</html>
|