anycoder-21e7a867 / index.html
akhaliq's picture
akhaliq HF Staff
Upload index.html with huggingface_hub
e4f1dc0 verified
Raw
History Blame Contribute Delete
3.58 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Chat - Powered by Transformers.js</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header class="header">
<div class="header-content">
<div class="logo">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none">
<circle cx="16" cy="16" r="14" fill="url(#gradient)" />
<path d="M12 16L15 19L20 13" stroke="white" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round" />
<defs>
<linearGradient id="gradient" x1="0" y1="0" x2="32" y2="32">
<stop offset="0%" stop-color="#667eea" />
<stop offset="100%" stop-color="#764ba2" />
</linearGradient>
</defs>
</svg>
<h1>AI Assistant</h1>
</div>
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
Built with anycoder
</a>
</div>
</header>
<div class="chat-container">
<div id="loadingScreen" class="loading-screen">
<div class="loading-content">
<div class="spinner"></div>
<h2>Initializing AI Model</h2>
<p id="loadingStatus">Preparing your assistant...</p>
<div class="progress-bar">
<div id="progressFill" class="progress-fill"></div>
</div>
<p id="loadingDetails" class="loading-details"></p>
</div>
</div>
<div id="chatInterface" class="chat-interface" style="display: none;">
<div id="messagesContainer" class="messages-container">
<div class="welcome-message">
<h2>πŸ‘‹ Hello!</h2>
<p>I'm your AI assistant powered by Gemma 3. How can I help you today?</p>
<div class="suggestions">
<button class="suggestion-btn" data-prompt="Write a poem about machine learning">
✨ Write a poem
</button>
<button class="suggestion-btn" data-prompt="Explain quantum computing in simple terms">
πŸ”¬ Explain quantum computing
</button>
<button class="suggestion-btn" data-prompt="Give me 5 creative writing prompts">
πŸ“ Creative prompts
</button>
</div>
</div>
</div>
<div class="input-container">
<div class="input-wrapper">
<textarea
id="userInput"
placeholder="Type your message..."
rows="1"
maxlength="500"
></textarea>
<button id="sendBtn" class="send-btn" disabled>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M22 2L11 13M22 2L15 22L11 13M22 2L2 9L11 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
<div class="input-info">
<span id="charCount">0/500</span>
<span class="model-info">Gemma 3 270M</span>
</div>
</div>
</div>
</div>
</div>
<script type="module" src="app.js"></script>
</body>
</html>