Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Apple Style Chatbot - Gemma AI</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <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@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <div class="app-container"> | |
| <!-- Header --> | |
| <header class="header"> | |
| <div class="header-content"> | |
| <div class="header-left"> | |
| <div class="ai-icon"> | |
| <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" | |
| stroke-linecap="round" stroke-linejoin="round"> | |
| <path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z" /> | |
| <path d="M12 8v4" /> | |
| <circle cx="12" cy="16" r="1" /> | |
| </svg> | |
| </div> | |
| <div class="header-text"> | |
| <h1>Gemma AI Assistant</h1> | |
| <p id="status" class="status-text">Loading model...</p> | |
| </div> | |
| </div> | |
| <div class="header-right"> | |
| <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with"> | |
| Built with anycoder | |
| </a> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Chat Container --> | |
| <main class="chat-container"> | |
| <div id="chatMessages" class="chat-messages"> | |
| <div class="welcome-message"> | |
| <div class="ai-avatar"> | |
| <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> | |
| <path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z" /> | |
| <path d="M12 8v4" /> | |
| <circle cx="12" cy="16" r="1" /> | |
| </svg> | |
| </div> | |
| <div class="message-content"> | |
| <p>Hello! I'm Gemma, your AI assistant. How can I help you today?</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Loading Indicator --> | |
| <div id="loadingIndicator" class="loading-indicator hidden"> | |
| <div class="loading-spinner"></div> | |
| <span>Downloading model...</span> | |
| <div class="progress-bar"> | |
| <div id="progressFill" class="progress-fill"></div> | |
| </div> | |
| <span id="progressText" class="progress-text">0%</span> | |
| </div> | |
| </main> | |
| <!-- Input Area --> | |
| <footer class="input-area"> | |
| <div class="input-container"> | |
| <textarea | |
| id="messageInput" | |
| class="message-input" | |
| placeholder="Type your message..." | |
| rows="1" | |
| disabled | |
| ></textarea> | |
| <button id="sendButton" class="send-button" disabled> | |
| <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> | |
| <line x1="22" y1="2" x2="11" y2="13"></line> | |
| <polygon points="22 2 15 22 11 13 2 9 22 2"></polygon> | |
| </svg> | |
| </button> | |
| </div> | |
| <div class="input-footer"> | |
| <small id="charCount">0 / 1000</small> | |
| <small>Powered by Gemma 3-270M</small> | |
| </div> | |
| </footer> | |
| </div> | |
| <script src="https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/dist/transformers.min.js"></script> | |
| <script src="index.js"></script> | |
| </body> | |
| </html> |