Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142<!DOCTYPE html><html><head><title>Sign Language Recognition</title></head><body><h1>Sign Language Recognition (Itsekiri Digits)</h1><video id="video" width="640" height="480" autoplay></video><button id="capture">Capture & Predict</button><div><h3>Processed Output:</h3><img id="output" width="640"></div><script>const video = document.getElementById('video');const outputImg = document.getElementById('output');// Access webcamnavigator.mediaDevices.getUserMedia({ video: true }).then(stream => { video.srcObject = stream; });document.getElementById('capture').addEventListener('click', () => {const canvas = document.createElement('canvas');canvas.width = video.videoWidth;canvas.height = video.videoHeight;canvas.getContext('2d').drawImage(video, 0, 0);const imgData = canvas.toDataURL('image/jpeg');fetch('/predict', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({ image: imgData })}).then(res => res.json()).then(data => {outputImg.src = data.processed_image;});});</script></body></html>1234567891011121314<!DOCTYPE html><html><head><title>Digits SignLang - Live</title><style>body { text-align: center; background: #111; color: white; }img { border: 4px solid white; margin-top: 20px; }</style></head><body><h1>Digits Sign Language Recognition</h1><img src="{{ url_for('video_feed') }}" width="640" height="480"></body></html>
templates/index.html+7-35