Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>π Woof Tracker</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| color: white; | |
| padding: 20px; | |
| } | |
| .container { | |
| text-align: center; | |
| max-width: 600px; | |
| } | |
| h1 { | |
| font-size: 3rem; | |
| margin-bottom: 1rem; | |
| } | |
| .emoji { | |
| font-size: 5rem; | |
| margin-bottom: 1rem; | |
| animation: bounce 1s infinite; | |
| } | |
| @keyframes bounce { | |
| 0%, 100% { transform: translateY(0); } | |
| 50% { transform: translateY(-10px); } | |
| } | |
| p { | |
| font-size: 1.2rem; | |
| opacity: 0.9; | |
| margin-bottom: 2rem; | |
| line-height: 1.6; | |
| } | |
| .features { | |
| background: rgba(255,255,255,0.1); | |
| border-radius: 16px; | |
| padding: 24px; | |
| text-align: left; | |
| } | |
| .feature { | |
| display: flex; | |
| align-items: center; | |
| margin: 12px 0; | |
| } | |
| .feature-icon { | |
| font-size: 1.5rem; | |
| margin-right: 12px; | |
| } | |
| .video-container { | |
| margin-top: 2rem; | |
| background: rgba(0,0,0,0.3); | |
| border-radius: 12px; | |
| padding: 8px; | |
| } | |
| .video-container img { | |
| max-width: 100%; | |
| border-radius: 8px; | |
| } | |
| .status { | |
| margin-top: 1rem; | |
| padding: 8px 16px; | |
| background: rgba(255,255,255,0.2); | |
| border-radius: 20px; | |
| font-size: 0.9rem; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="emoji">π</div> | |
| <h1>Woof Tracker</h1> | |
| <p>Reachy Mini is tracking people and dogs!<br>Dogs always get priority - WOOF WOOF!</p> | |
| <div class="features"> | |
| <div class="feature"> | |
| <span class="feature-icon">π€</span> | |
| <span>Tracks the closest person in view</span> | |
| </div> | |
| <div class="feature"> | |
| <span class="feature-icon">π</span> | |
| <span>Immediately switches to dogs (dogs always win!)</span> | |
| </div> | |
| <div class="feature"> | |
| <span class="feature-icon">π</span> | |
| <span>Says "Woof woof!" when a dog is spotted</span> | |
| </div> | |
| <div class="feature"> | |
| <span class="feature-icon">π</span> | |
| <span>Scans around when no targets visible</span> | |
| </div> | |
| </div> | |
| <div class="video-container"> | |
| <img id="video-feed" src="/video_feed" alt="Camera Feed" onerror="this.style.display='none'"> | |
| </div> | |
| <div class="status" id="status"> | |
| Loading... | |
| </div> | |
| </div> | |
| <script> | |
| async function checkStatus() { | |
| try { | |
| const resp = await fetch('/ready'); | |
| const data = await resp.json(); | |
| document.getElementById('status').textContent = data.ready ? 'β Tracking Active' : 'β³ Initializing...'; | |
| } catch (e) { | |
| document.getElementById('status').textContent = 'π Connecting...'; | |
| } | |
| } | |
| setInterval(checkStatus, 2000); | |
| checkStatus(); | |
| </script> | |
| </body> | |
| </html> | |