Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- index.html +86 -18
index.html
CHANGED
|
@@ -2,28 +2,96 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
| 10 |
</head>
|
| 11 |
|
| 12 |
<body>
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
|
|
|
| 27 |
</body>
|
| 28 |
|
| 29 |
</html>
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
|
| 4 |
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Apple Style Chatbot - Gemma AI</title>
|
| 8 |
+
<link rel="stylesheet" href="style.css">
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 12 |
</head>
|
| 13 |
|
| 14 |
<body>
|
| 15 |
+
<div class="app-container">
|
| 16 |
+
<!-- Header -->
|
| 17 |
+
<header class="header">
|
| 18 |
+
<div class="header-content">
|
| 19 |
+
<div class="header-left">
|
| 20 |
+
<div class="ai-icon">
|
| 21 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
| 22 |
+
stroke-linecap="round" stroke-linejoin="round">
|
| 23 |
+
<path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z" />
|
| 24 |
+
<path d="M12 8v4" />
|
| 25 |
+
<circle cx="12" cy="16" r="1" />
|
| 26 |
+
</svg>
|
| 27 |
+
</div>
|
| 28 |
+
<div class="header-text">
|
| 29 |
+
<h1>Gemma AI Assistant</h1>
|
| 30 |
+
<p id="status" class="status-text">Loading model...</p>
|
| 31 |
+
</div>
|
| 32 |
+
</div>
|
| 33 |
+
<div class="header-right">
|
| 34 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
|
| 35 |
+
Built with anycoder
|
| 36 |
+
</a>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
</header>
|
| 40 |
+
|
| 41 |
+
<!-- Chat Container -->
|
| 42 |
+
<main class="chat-container">
|
| 43 |
+
<div id="chatMessages" class="chat-messages">
|
| 44 |
+
<div class="welcome-message">
|
| 45 |
+
<div class="ai-avatar">
|
| 46 |
+
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 47 |
+
<path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z" />
|
| 48 |
+
<path d="M12 8v4" />
|
| 49 |
+
<circle cx="12" cy="16" r="1" />
|
| 50 |
+
</svg>
|
| 51 |
+
</div>
|
| 52 |
+
<div class="message-content">
|
| 53 |
+
<p>Hello! I'm Gemma, your AI assistant. How can I help you today?</p>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<!-- Loading Indicator -->
|
| 59 |
+
<div id="loadingIndicator" class="loading-indicator hidden">
|
| 60 |
+
<div class="loading-spinner"></div>
|
| 61 |
+
<span>Downloading model...</span>
|
| 62 |
+
<div class="progress-bar">
|
| 63 |
+
<div id="progressFill" class="progress-fill"></div>
|
| 64 |
+
</div>
|
| 65 |
+
<span id="progressText" class="progress-text">0%</span>
|
| 66 |
+
</div>
|
| 67 |
+
</main>
|
| 68 |
+
|
| 69 |
+
<!-- Input Area -->
|
| 70 |
+
<footer class="input-area">
|
| 71 |
+
<div class="input-container">
|
| 72 |
+
<textarea
|
| 73 |
+
id="messageInput"
|
| 74 |
+
class="message-input"
|
| 75 |
+
placeholder="Type your message..."
|
| 76 |
+
rows="1"
|
| 77 |
+
disabled
|
| 78 |
+
></textarea>
|
| 79 |
+
<button id="sendButton" class="send-button" disabled>
|
| 80 |
+
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 81 |
+
<line x1="22" y1="2" x2="11" y2="13"></line>
|
| 82 |
+
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
|
| 83 |
+
</svg>
|
| 84 |
+
</button>
|
| 85 |
+
</div>
|
| 86 |
+
<div class="input-footer">
|
| 87 |
+
<small id="charCount">0 / 1000</small>
|
| 88 |
+
<small>Powered by Gemma 3-270M</small>
|
| 89 |
+
</div>
|
| 90 |
+
</footer>
|
| 91 |
+
</div>
|
| 92 |
|
| 93 |
+
<script src="https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/dist/transformers.min.js"></script>
|
| 94 |
+
<script src="index.js"></script>
|
| 95 |
</body>
|
| 96 |
|
| 97 |
</html>
|