Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +289 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: red
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: kks
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
colorTo: red
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,289 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Webcam Access</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
.camera-container {
|
| 11 |
+
position: relative;
|
| 12 |
+
width: 100%;
|
| 13 |
+
max-width: 640px;
|
| 14 |
+
margin: 0 auto;
|
| 15 |
+
border-radius: 16px;
|
| 16 |
+
overflow: hidden;
|
| 17 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
| 18 |
+
background: linear-gradient(145deg, #f0f0f0, #ffffff);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.video-placeholder {
|
| 22 |
+
width: 100%;
|
| 23 |
+
aspect-ratio: 16/9;
|
| 24 |
+
display: flex;
|
| 25 |
+
align-items: center;
|
| 26 |
+
justify-content: center;
|
| 27 |
+
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
| 28 |
+
color: #4b5563;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.video-element {
|
| 32 |
+
width: 100%;
|
| 33 |
+
height: auto;
|
| 34 |
+
display: none;
|
| 35 |
+
transform: scaleX(-1); /* Mirror effect */
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.controls {
|
| 39 |
+
position: absolute;
|
| 40 |
+
bottom: 20px;
|
| 41 |
+
left: 0;
|
| 42 |
+
right: 0;
|
| 43 |
+
display: flex;
|
| 44 |
+
justify-content: center;
|
| 45 |
+
gap: 16px;
|
| 46 |
+
z-index: 10;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
.btn {
|
| 50 |
+
padding: 12px 24px;
|
| 51 |
+
border-radius: 50px;
|
| 52 |
+
font-weight: 600;
|
| 53 |
+
transition: all 0.3s ease;
|
| 54 |
+
display: flex;
|
| 55 |
+
align-items: center;
|
| 56 |
+
gap: 8px;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.btn-primary {
|
| 60 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 61 |
+
color: white;
|
| 62 |
+
border: none;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.btn-primary:hover {
|
| 66 |
+
transform: translateY(-2px);
|
| 67 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.btn-secondary {
|
| 71 |
+
background: rgba(255, 255, 255, 0.9);
|
| 72 |
+
color: #4b5563;
|
| 73 |
+
border: 1px solid #e5e7eb;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.btn-secondary:hover {
|
| 77 |
+
background: white;
|
| 78 |
+
transform: translateY(-2px);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.permission-denied {
|
| 82 |
+
display: none;
|
| 83 |
+
text-align: center;
|
| 84 |
+
padding: 20px;
|
| 85 |
+
color: #ef4444;
|
| 86 |
+
background-color: #fee2e2;
|
| 87 |
+
border-radius: 8px;
|
| 88 |
+
margin-top: 20px;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.loading {
|
| 92 |
+
display: none;
|
| 93 |
+
flex-direction: column;
|
| 94 |
+
align-items: center;
|
| 95 |
+
gap: 16px;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.spinner {
|
| 99 |
+
width: 40px;
|
| 100 |
+
height: 40px;
|
| 101 |
+
border: 4px solid rgba(0, 0, 0, 0.1);
|
| 102 |
+
border-radius: 50%;
|
| 103 |
+
border-left-color: #764ba2;
|
| 104 |
+
animation: spin 1s linear infinite;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
@keyframes spin {
|
| 108 |
+
to { transform: rotate(360deg); }
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.status {
|
| 112 |
+
margin-top: 20px;
|
| 113 |
+
padding: 10px;
|
| 114 |
+
border-radius: 8px;
|
| 115 |
+
text-align: center;
|
| 116 |
+
display: none;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.success {
|
| 120 |
+
background-color: #dcfce7;
|
| 121 |
+
color: #166534;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.error {
|
| 125 |
+
background-color: #fee2e2;
|
| 126 |
+
color: #991b1b;
|
| 127 |
+
}
|
| 128 |
+
</style>
|
| 129 |
+
</head>
|
| 130 |
+
<body class="bg-gray-50 min-h-screen flex flex-col items-center justify-center p-4">
|
| 131 |
+
<div class="max-w-2xl w-full space-y-8">
|
| 132 |
+
<div class="text-center">
|
| 133 |
+
<h1 class="text-3xl font-bold text-gray-900 mb-2">Webcam Access</h1>
|
| 134 |
+
<p class="text-gray-600">Click the button below to start your camera</p>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<div class="camera-container">
|
| 138 |
+
<div class="video-placeholder" id="placeholder">
|
| 139 |
+
<div class="text-center p-6">
|
| 140 |
+
<i class="fas fa-camera text-4xl mb-4 text-gray-400"></i>
|
| 141 |
+
<p class="text-lg font-medium">Camera feed will appear here</p>
|
| 142 |
+
<p class="text-sm text-gray-500 mt-2">Click "Start Camera" to begin</p>
|
| 143 |
+
</div>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<video id="video" class="video-element" autoplay playsinline></video>
|
| 147 |
+
|
| 148 |
+
<div class="controls">
|
| 149 |
+
<button id="startBtn" class="btn btn-primary">
|
| 150 |
+
<i class="fas fa-play"></i> Start Camera
|
| 151 |
+
</button>
|
| 152 |
+
<button id="stopBtn" class="btn btn-secondary" disabled>
|
| 153 |
+
<i class="fas fa-stop"></i> Stop
|
| 154 |
+
</button>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
|
| 158 |
+
<div id="loading" class="loading">
|
| 159 |
+
<div class="spinner"></div>
|
| 160 |
+
<p>Accessing your camera...</p>
|
| 161 |
+
</div>
|
| 162 |
+
|
| 163 |
+
<div id="permissionDenied" class="permission-denied">
|
| 164 |
+
<i class="fas fa-exclamation-triangle text-2xl mb-2"></i>
|
| 165 |
+
<p>Camera access was denied. Please refresh and allow camera permissions.</p>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div id="statusMessage" class="status">
|
| 169 |
+
<!-- Status messages will appear here -->
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="mt-8 bg-white p-6 rounded-xl shadow-sm border border-gray-200">
|
| 173 |
+
<h2 class="text-xl font-semibold mb-4 text-gray-800">Privacy Notice</h2>
|
| 174 |
+
<p class="text-gray-600 mb-4">
|
| 175 |
+
This application requires camera access to function properly. Your video feed is processed locally in your browser and is not stored or transmitted to any servers.
|
| 176 |
+
</p>
|
| 177 |
+
<div class="flex items-center text-sm text-gray-500">
|
| 178 |
+
<i class="fas fa-lock mr-2"></i>
|
| 179 |
+
<span>Your privacy is important to us. Camera access is used solely for this session.</span>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
<script>
|
| 185 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 186 |
+
const video = document.getElementById('video');
|
| 187 |
+
const startBtn = document.getElementById('startBtn');
|
| 188 |
+
const stopBtn = document.getElementById('stopBtn');
|
| 189 |
+
const placeholder = document.getElementById('placeholder');
|
| 190 |
+
const loading = document.getElementById('loading');
|
| 191 |
+
const permissionDenied = document.getElementById('permissionDenied');
|
| 192 |
+
const statusMessage = document.getElementById('statusMessage');
|
| 193 |
+
|
| 194 |
+
let stream = null;
|
| 195 |
+
|
| 196 |
+
// Function to start the camera
|
| 197 |
+
async function startCamera() {
|
| 198 |
+
try {
|
| 199 |
+
// Show loading state
|
| 200 |
+
startBtn.disabled = true;
|
| 201 |
+
placeholder.style.display = 'none';
|
| 202 |
+
loading.style.display = 'flex';
|
| 203 |
+
permissionDenied.style.display = 'none';
|
| 204 |
+
|
| 205 |
+
// Request camera access
|
| 206 |
+
stream = await navigator.mediaDevices.getUserMedia({
|
| 207 |
+
video: {
|
| 208 |
+
width: { ideal: 1280 },
|
| 209 |
+
height: { ideal: 720 },
|
| 210 |
+
facingMode: 'user'
|
| 211 |
+
},
|
| 212 |
+
audio: false
|
| 213 |
+
});
|
| 214 |
+
|
| 215 |
+
// Display the video stream
|
| 216 |
+
video.srcObject = stream;
|
| 217 |
+
video.style.display = 'block';
|
| 218 |
+
|
| 219 |
+
// Hide loading and show success
|
| 220 |
+
loading.style.display = 'none';
|
| 221 |
+
stopBtn.disabled = false;
|
| 222 |
+
|
| 223 |
+
// Show status message
|
| 224 |
+
showStatus('Camera access granted!', 'success');
|
| 225 |
+
|
| 226 |
+
} catch (err) {
|
| 227 |
+
console.error('Error accessing camera:', err);
|
| 228 |
+
|
| 229 |
+
// Show appropriate error message
|
| 230 |
+
loading.style.display = 'none';
|
| 231 |
+
startBtn.disabled = false;
|
| 232 |
+
|
| 233 |
+
if (err.name === 'NotAllowedError') {
|
| 234 |
+
permissionDenied.style.display = 'block';
|
| 235 |
+
showStatus('Camera access was denied.', 'error');
|
| 236 |
+
} else if (err.name === 'NotFoundError') {
|
| 237 |
+
showStatus('No camera device found.', 'error');
|
| 238 |
+
} else {
|
| 239 |
+
showStatus('Error accessing camera: ' + err.message, 'error');
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
// Show placeholder again
|
| 243 |
+
placeholder.style.display = 'flex';
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
// Function to stop the camera
|
| 248 |
+
function stopCamera() {
|
| 249 |
+
if (stream) {
|
| 250 |
+
const tracks = stream.getTracks();
|
| 251 |
+
tracks.forEach(track => track.stop());
|
| 252 |
+
video.srcObject = null;
|
| 253 |
+
stream = null;
|
| 254 |
+
|
| 255 |
+
// Reset UI
|
| 256 |
+
video.style.display = 'none';
|
| 257 |
+
placeholder.style.display = 'flex';
|
| 258 |
+
startBtn.disabled = false;
|
| 259 |
+
stopBtn.disabled = true;
|
| 260 |
+
|
| 261 |
+
showStatus('Camera stopped.', 'success');
|
| 262 |
+
}
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
// Function to show status messages
|
| 266 |
+
function showStatus(message, type) {
|
| 267 |
+
statusMessage.textContent = message;
|
| 268 |
+
statusMessage.className = 'status ' + type;
|
| 269 |
+
statusMessage.style.display = 'block';
|
| 270 |
+
|
| 271 |
+
// Hide after 5 seconds
|
| 272 |
+
setTimeout(() => {
|
| 273 |
+
statusMessage.style.display = 'none';
|
| 274 |
+
}, 5000);
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
// Event listeners
|
| 278 |
+
startBtn.addEventListener('click', startCamera);
|
| 279 |
+
stopBtn.addEventListener('click', stopCamera);
|
| 280 |
+
|
| 281 |
+
// Check if browser supports mediaDevices
|
| 282 |
+
if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
|
| 283 |
+
startBtn.disabled = true;
|
| 284 |
+
showStatus('Your browser does not support camera access.', 'error');
|
| 285 |
+
}
|
| 286 |
+
});
|
| 287 |
+
</script>
|
| 288 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=rerisson2006/kks" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 289 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
cria uma script assim que a pessoa clica em start da pra mim ver a camera da pessoa
|