Spaces:
Runtime error
Runtime error
Download templates/index.html from manasmaskar/Customer-Support-AI-Agent: direct link, hf CLI and curl.
- Browser
- Download file 6.91 kB
-
https://huggingface.co/spaces/manasmaskar/Customer-Support-AI-Agent/resolve/main/templates/index.html
- Command line
-
hf download hf://spaces/manasmaskar/Customer-Support-AI-Agent/templates/index.html
-
curl -L -o index.html https://huggingface.co/spaces/manasmaskar/Customer-Support-AI-Agent/resolve/main/templates/index.html
6.91 kB
| <html> | |
| <head> | |
| <title>Arlo AI Agent - Manas Maskar</title> | |
| <style> | |
| * { margin: 0; padding: 0; box-sizing: border-box; } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| min-height: 100vh; | |
| padding: 20px; | |
| } | |
| .container { | |
| max-width: 900px; | |
| margin: 0 auto; | |
| background: white; | |
| border-radius: 20px; | |
| box-shadow: 0 20px 60px rgba(0,0,0,0.3); | |
| overflow: hidden; | |
| } | |
| .header { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| padding: 30px; | |
| text-align: center; | |
| } | |
| .header h1 { font-size: 2em; margin-bottom: 10px; } | |
| .header p { opacity: 0.9; font-size: 0.9em; } | |
| .developer { | |
| background: rgba(255,255,255,0.1); | |
| padding: 10px; | |
| border-radius: 10px; | |
| margin-top: 15px; | |
| font-size: 0.85em; | |
| } | |
| .chat-container { | |
| padding: 30px; | |
| min-height: 400px; | |
| max-height: 500px; | |
| overflow-y: auto; | |
| } | |
| .message { | |
| margin-bottom: 20px; | |
| padding: 15px; | |
| border-radius: 15px; | |
| max-width: 80%; | |
| } | |
| .user-message { | |
| background: #667eea; | |
| color: white; | |
| margin-left: auto; | |
| text-align: right; | |
| } | |
| .assistant-message { | |
| background: #f1f3f4; | |
| color: #333; | |
| } | |
| .input-container { | |
| padding: 20px; | |
| background: #f8f9fa; | |
| border-top: 1px solid #e0e0e0; | |
| display: flex; | |
| gap: 10px; | |
| } | |
| #questionInput { | |
| flex: 1; | |
| padding: 15px; | |
| border: 2px solid #e0e0e0; | |
| border-radius: 25px; | |
| font-size: 1em; | |
| outline: none; | |
| transition: border 0.3s; | |
| } | |
| #questionInput:focus { border-color: #667eea; } | |
| button { | |
| padding: 15px 30px; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| border: none; | |
| border-radius: 25px; | |
| cursor: pointer; | |
| font-weight: bold; | |
| transition: transform 0.2s; | |
| } | |
| button:hover { transform: scale(1.05); } | |
| button:disabled { opacity: 0.5; cursor: not-allowed; } | |
| .loading { display: none; color: #667eea; padding: 10px; } | |
| .examples { | |
| padding: 20px; | |
| background: #f8f9fa; | |
| border-top: 1px solid #e0e0e0; | |
| } | |
| .examples h3 { margin-bottom: 10px; font-size: 1em; color: #666; } | |
| .example-btn { | |
| display: inline-block; | |
| margin: 5px; | |
| padding: 8px 15px; | |
| background: white; | |
| border: 1px solid #ddd; | |
| border-radius: 15px; | |
| cursor: pointer; | |
| font-size: 0.85em; | |
| transition: all 0.2s; | |
| } | |
| .example-btn:hover { | |
| background: #667eea; | |
| color: white; | |
| border-color: #667eea; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="header"> | |
| <h1>π Arlo AI Support Agent</h1> | |
| <p>Powered by Retrieval-Augmented Generation (RAG)</p> | |
| <div class="developer"> | |
| π¨βπ» Developed by <strong>Manas Maskar</strong> | Software Engineer & ML Specialist | |
| </div> | |
| </div> | |
| <div class="examples"> | |
| <h3>Try these questions:</h3> | |
| <span class="example-btn" onclick="askQuestion('Does Arlo support a trial plan?')">Trial Plan</span> | |
| <span class="example-btn" onclick="askQuestion('What battery does Arlo Pro 3 use?')">Battery Info</span> | |
| <span class="example-btn" onclick="askQuestion('How do I factory reset my camera?')">Factory Reset</span> | |
| <span class="example-btn" onclick="askQuestion('What are Arlo Modes and Routines?')">Modes & Routines</span> | |
| </div> | |
| <div class="chat-container" id="chatContainer"></div> | |
| <div class="input-container"> | |
| <input | |
| type="text" | |
| id="questionInput" | |
| placeholder="Ask anything about Arlo products..." | |
| onkeypress="if(event.key==='Enter') sendQuestion()" | |
| /> | |
| <button onclick="sendQuestion()" id="sendBtn">Send</button> | |
| </div> | |
| <div class="loading" id="loading">π€ Thinking...</div> | |
| </div> | |
| <script> | |
| function addMessage(content, isUser) { | |
| const chatContainer = document.getElementById('chatContainer'); | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = `message ${isUser ? 'user-message' : 'assistant-message'}`; | |
| messageDiv.innerHTML = content.replace(/\n/g, '<br>'); | |
| chatContainer.appendChild(messageDiv); | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| } | |
| function askQuestion(question) { | |
| document.getElementById('questionInput').value = question; | |
| sendQuestion(); | |
| } | |
| async function sendQuestion() { | |
| const input = document.getElementById('questionInput'); | |
| const question = input.value.trim(); | |
| if (!question) return; | |
| // Show user message | |
| addMessage(question, true); | |
| input.value = ''; | |
| // Show loading | |
| const loading = document.getElementById('loading'); | |
| const sendBtn = document.getElementById('sendBtn'); | |
| loading.style.display = 'block'; | |
| sendBtn.disabled = true; | |
| try { | |
| const response = await fetch('/query', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ question }) | |
| }); | |
| const data = await response.json(); | |
| addMessage(data.answer, false); | |
| } catch (error) { | |
| addMessage('β Error: Could not process your question. Please try again.', false); | |
| } finally { | |
| loading.style.display = 'none'; | |
| sendBtn.disabled = false; | |
| } | |
| } | |
| // Show welcome message | |
| window.onload = () => { | |
| addMessage('π Hello! I\'m the Arlo AI Support Agent. Ask me anything about Arlo cameras, subscriptions, setup, or troubleshooting!', false); | |
| }; | |
| </script> | |
| </body> | |
| </html> | |