Download index2.html from Darwis-Ai/Sign2Text: direct link, hf CLI and curl.
- Browser
- Download file 3.04 kB
-
https://huggingface.co/spaces/Darwis-Ai/Sign2Text/resolve/main/index2.html
- Command line
-
hf download hf://spaces/Darwis-Ai/Sign2Text/index2.html
-
curl -L -o index2.html https://huggingface.co/spaces/Darwis-Ai/Sign2Text/resolve/main/index2.html
3.04 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sign Language - Hybrid</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.7.2/socket.io.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js" crossorigin="anonymous"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/@mediapipe/control_utils/control_utils.js" crossorigin="anonymous"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/@mediapipe/drawing_utils/drawing_utils.js" crossorigin="anonymous"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/@mediapipe/hands/hands.js" crossorigin="anonymous"></script> | |
| <style> | |
| body { font-family: sans-serif; text-align: center; background: #f0f2f5; margin: 0; padding: 20px; } | |
| .main-container { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; } | |
| .view-box { | |
| position: relative; | |
| width: 100%; | |
| max-width: 640px; | |
| aspect-ratio: 4/3; | |
| background: #000; | |
| border: 4px solid #333; | |
| border-radius: 12px; | |
| overflow: hidden; | |
| } | |
| video { display: none; } | |
| canvas { | |
| width: 100%; | |
| height: 100%; | |
| object-fit: contain; | |
| transform: scaleX(1); /* المراية */ | |
| } | |
| .info-panel { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 15px; } | |
| .card { background: white; padding: 15px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); } | |
| .output-text { font-size: 24px; font-weight: bold; color: #007bff; min-height: 30px; } | |
| button { padding: 10px 20px; font-size: 16px; cursor: pointer; background: #007bff; color: white; border: none; border-radius: 5px; margin: 5px; } | |
| button.active { background: #dc3545; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Sign Language Recognition</h1> | |
| <div class="main-container"> | |
| <div class="view-box"> | |
| <video id="video" playsinline></video> | |
| <canvas id="canvas"></canvas> | |
| </div> | |
| <div class="info-panel"> | |
| <button id="cameraBtn" onclick="toggleCamera()">Start Camera</button> | |
| <p style="font-size: 12px; color: #777;">💡 للموبايل: استخدم الوضع العرضي (Landscape)</p> | |
| <div class="card"> | |
| <h3>Live Prediction</h3> | |
| <div id="prediction" class="output-text">-</div> | |
| </div> | |
| <div class="card"> | |
| <h3>Sentence</h3> | |
| <div id="sentence" class="output-text"></div> | |
| </div> | |
| <div> | |
| <button id="backspace-btn">⌫ Backspace</button> | |
| <button id="clear-btn">Clear All</button> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="index2.js"></script> | |
| </body> | |
| </html> |