Spaces:
Running
Running
File size: 30,780 Bytes
1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 4c7d7af 1353a91 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Story Generator</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.video-container {
position: relative;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
height: 0;
overflow: hidden;
}
.video-container video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.dropzone {
border: 2px dashed #ccc;
transition: all 0.3s ease;
min-height: 200px;
display: flex;
align-items: center;
justify-content: center;
}
.dropzone.active {
border-color: #4f46e5;
background-color: #eef2ff;
transform: scale(0.98);
}
.story-card {
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.loading-dots:after {
content: '.';
animation: dots 1.5s steps(5, end) infinite;
}
@keyframes dots {
0%, 20% {
color: rgba(0,0,0,0);
text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
}
40% {
color: currentColor;
text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
}
60% {
text-shadow: .25em 0 0 currentColor, .5em 0 0 rgba(0,0,0,0);
}
80%, 100% {
text-shadow: .25em 0 0 currentColor, .5em 0 0 currentColor;
}
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="container mx-auto px-4 py-8 max-w-6xl">
<header class="text-center mb-12">
<h1 class="text-4xl md:text-5xl font-bold text-indigo-800 mb-4">Video Story Generator</h1>
<p class="text-lg text-gray-600 max-w-2xl mx-auto">
Upload your video and let our AI craft a unique story based on what it observes.
Perfect for content creators, storytellers, and anyone who loves creative narratives.
</p>
</header>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<div class="p-6">
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Upload Your Video</h2>
<div id="dropzone" class="dropzone rounded-lg p-8 text-center cursor-pointer mb-6">
<div id="upload-content" class="space-y-3">
<div class="flex justify-center">
<i class="fas fa-cloud-upload-alt text-5xl text-indigo-500"></i>
</div>
<h3 class="text-lg font-medium text-gray-700">Drag & drop your video here</h3>
<p class="text-sm text-gray-500">or click to browse files</p>
<p class="text-xs text-gray-400 mt-2">Supports MP4, MOV, AVI (Max 100MB)</p>
</div>
<input type="file" id="video-upload" class="hidden" accept="video/mp4,video/quicktime,video/x-msvideo">
</div>
<div id="video-preview-container" class="hidden mb-6">
<div class="video-container rounded-lg overflow-hidden shadow">
<video id="video-preview" controls></video>
</div>
<div class="mt-3 flex justify-between items-center">
<span id="video-name" class="text-sm font-medium text-gray-700 truncate"></span>
<button id="remove-video" class="text-red-500 hover:text-red-700 text-sm">
<i class="fas fa-times mr-1"></i> Remove
</button>
</div>
</div>
<div class="space-y-4">
<div>
<label for="story-style" class="block text-sm font-medium text-gray-700 mb-1">Story Style</label>
<select id="story-style" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
<option value="fantasy">Fantasy Adventure</option>
<option value="scifi">Sci-Fi Mystery</option>
<option value="romance">Romantic Drama</option>
<option value="comedy">Humorous Tale</option>
<option value="horror">Spooky Horror</option>
<option value="realistic">Realistic Fiction</option>
</select>
</div>
<div>
<label for="character-name" class="block text-sm font-medium text-gray-700 mb-1">Main Character Name (optional)</label>
<input type="text" id="character-name" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500" placeholder="e.g. Alex, Luna, Captain Nova">
</div>
<button id="generate-btn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-4 rounded-md transition duration-300 flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed" disabled>
<i class="fas fa-magic mr-2"></i> Generate Story
</button>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
<div class="p-6 h-full flex flex-col">
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Your Generated Story</h2>
<div id="story-placeholder" class="flex-1 flex items-center justify-center text-center p-8 bg-gray-50 rounded-lg">
<div>
<i class="fas fa-book-open text-4xl text-gray-300 mb-4"></i>
<p class="text-gray-500">Your story will appear here after you upload a video and click "Generate Story".</p>
</div>
</div>
<div id="loading-indicator" class="hidden flex-1 items-center justify-center p-8">
<div class="text-center">
<div class="inline-block animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-indigo-500 mb-4"></div>
<p class="text-gray-700 loading-dots">Analyzing video and crafting your story</p>
</div>
</div>
<div id="story-container" class="hidden flex-1 story-card rounded-lg p-6 overflow-y-auto">
<h3 id="story-title" class="text-xl font-bold text-gray-800 mb-3"></h3>
<div id="story-content" class="text-gray-700 leading-relaxed"></div>
</div>
<div id="story-actions" class="hidden mt-6 flex justify-between">
<button id="copy-story" class="px-4 py-2 bg-gray-200 hover:bg-gray-300 rounded-md text-gray-700 transition duration-300">
<i class="fas fa-copy mr-2"></i> Copy Story
</button>
<button id="download-story" class="px-4 py-2 bg-indigo-600 hover:bg-indigo-700 rounded-md text-white transition duration-300">
<i class="fas fa-download mr-2"></i> Download as TXT
</button>
</div>
</div>
</div>
</div>
<div class="bg-indigo-50 rounded-xl p-6 mb-8">
<h3 class="text-xl font-semibold text-indigo-800 mb-3">How It Works</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-white p-4 rounded-lg shadow">
<div class="text-indigo-600 mb-2">
<i class="fas fa-upload text-2xl"></i>
</div>
<h4 class="font-medium text-gray-800 mb-1">1. Upload Your Video</h4>
<p class="text-sm text-gray-600">Select any video from your device. Our system will analyze the visuals and motion.</p>
</div>
<div class="bg-white p-4 rounded-lg shadow">
<div class="text-indigo-600 mb-2">
<i class="fas fa-brain text-2xl"></i>
</div>
<h4 class="font-medium text-gray-800 mb-1">2. AI Analysis</h4>
<p class="text-sm text-gray-600">Our AI detects scenes, objects, colors, and movements to understand your video's content.</p>
</div>
<div class="bg-white p-4 rounded-lg shadow">
<div class="text-indigo-600 mb-2">
<i class="fas fa-book text-2xl"></i>
</div>
<h4 class="font-medium text-gray-800 mb-1">3. Story Generation</h4>
<p class="text-sm text-gray-600">A unique story is crafted based on the analysis, tailored to your selected style.</p>
</div>
</div>
</div>
<footer class="text-center text-gray-500 text-sm mt-12">
<p>Video Story Generator © 2023 | All uploaded videos are processed locally in your browser</p>
</footer>
</div>
<script>
</script>
<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=suppressor14/testing-cog" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |