rahul7star commited on
Commit
fe13724
·
verified ·
1 Parent(s): adb5e00

undefined - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +575 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Ai Clone
3
- emoji: 📚
4
- colorFrom: green
5
- colorTo: pink
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: ai-clone
3
+ emoji: 🐳
4
+ colorFrom: blue
5
+ colorTo: blue
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,575 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>AI Clone Creator</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
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #6e8efb, #a777e3);
12
+ }
13
+ .upload-area {
14
+ border: 2px dashed #a777e3;
15
+ transition: all 0.3s ease;
16
+ }
17
+ .upload-area:hover {
18
+ border-color: #6e8efb;
19
+ background-color: rgba(110, 142, 251, 0.05);
20
+ }
21
+ .progress-bar {
22
+ height: 8px;
23
+ background-color: #e0e0e0;
24
+ border-radius: 4px;
25
+ overflow: hidden;
26
+ }
27
+ .progress-fill {
28
+ height: 100%;
29
+ background: linear-gradient(90deg, #6e8efb, #a777e3);
30
+ transition: width 0.3s ease;
31
+ }
32
+ .result-card {
33
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
34
+ transition: transform 0.3s ease;
35
+ }
36
+ .result-card:hover {
37
+ transform: translateY(-5px);
38
+ }
39
+ .video-container {
40
+ position: relative;
41
+ padding-bottom: 56.25%;
42
+ height: 0;
43
+ overflow: hidden;
44
+ }
45
+ .video-container iframe {
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ width: 100%;
50
+ height: 100%;
51
+ }
52
+ </style>
53
+ </head>
54
+ <body class="bg-gray-50 min-h-screen">
55
+ <!-- Header -->
56
+ <header class="gradient-bg text-white py-6">
57
+ <div class="container mx-auto px-4">
58
+ <div class="flex justify-between items-center">
59
+ <h1 class="text-3xl font-bold">AI Clone Creator</h1>
60
+ <nav>
61
+ <ul class="flex space-x-6">
62
+ <li><a href="#image-clone" class="hover:text-gray-200 transition">Image Clone</a></li>
63
+ <li><a href="#video-clone" class="hover:text-gray-200 transition">Video Clone</a></li>
64
+ <li><a href="#about" class="hover:text-gray-200 transition">About</a></li>
65
+ </ul>
66
+ </nav>
67
+ </div>
68
+ </div>
69
+ </header>
70
+
71
+ <!-- Main Content -->
72
+ <main class="container mx-auto px-4 py-12">
73
+ <!-- Hero Section -->
74
+ <section class="text-center mb-20">
75
+ <h2 class="text-4xl font-bold mb-4">Create Your Digital Twin</h2>
76
+ <p class="text-xl text-gray-600 max-w-2xl mx-auto">
77
+ Upload your photo and we'll create an AI clone that can generate images and videos of you in any scenario.
78
+ </p>
79
+ </section>
80
+
81
+ <!-- Image Clone Section -->
82
+ <section id="image-clone" class="mb-20">
83
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden">
84
+ <div class="md:flex">
85
+ <!-- Upload Area -->
86
+ <div class="md:w-1/2 p-8">
87
+ <h3 class="text-2xl font-bold mb-6">Create Your Image Clone</h3>
88
+ <p class="text-gray-600 mb-6">
89
+ Upload a clear photo of yourself (face forward, good lighting) to create your digital twin.
90
+ </p>
91
+
92
+ <div id="upload-container" class="upload-area rounded-lg p-8 text-center cursor-pointer mb-6">
93
+ <input type="file" id="image-upload" class="hidden" accept="image/*">
94
+ <div id="upload-content" class="flex flex-col items-center justify-center">
95
+ <i class="fas fa-cloud-upload-alt text-4xl text-purple-500 mb-4"></i>
96
+ <p class="text-lg font-medium mb-2">Drag & drop your photo here</p>
97
+ <p class="text-gray-500 mb-4">or</p>
98
+ <button id="upload-btn" class="bg-purple-500 hover:bg-purple-600 text-white font-medium py-2 px-6 rounded-full transition">
99
+ Browse Files
100
+ </button>
101
+ <p class="text-sm text-gray-500 mt-2">JPEG, PNG up to 5MB</p>
102
+ </div>
103
+
104
+ <div id="upload-progress" class="hidden">
105
+ <div class="flex items-center justify-center mb-4">
106
+ <div class="w-16 h-16 border-4 border-purple-500 border-t-transparent rounded-full animate-spin"></div>
107
+ </div>
108
+ <p class="font-medium mb-2">Processing your image...</p>
109
+ <div class="progress-bar w-full mb-2">
110
+ <div id="progress-fill" class="progress-fill" style="width: 0%"></div>
111
+ </div>
112
+ <p id="progress-text" class="text-sm text-gray-500">0% complete</p>
113
+ </div>
114
+
115
+ <div id="upload-preview" class="hidden">
116
+ <div class="flex justify-center mb-4">
117
+ <img id="preview-image" src="" alt="Preview" class="w-32 h-32 rounded-full object-cover border-4 border-purple-200">
118
+ </div>
119
+ <p class="font-medium mb-2">Image uploaded successfully!</p>
120
+ <button id="generate-btn" class="bg-purple-500 hover:bg-purple-600 text-white font-medium py-2 px-6 rounded-full transition">
121
+ Generate Clone
122
+ </button>
123
+ </div>
124
+ </div>
125
+ </div>
126
+
127
+ <!-- Result Area -->
128
+ <div class="md:w-1/2 bg-gray-50 p-8">
129
+ <h3 class="text-2xl font-bold mb-6">Your AI Clone Results</h3>
130
+ <p class="text-gray-600 mb-6">
131
+ Your digital twin will appear here. Try different styles and scenarios.
132
+ </p>
133
+
134
+ <div id="result-area" class="hidden">
135
+ <div class="grid grid-cols-2 gap-4 mb-6">
136
+ <div class="result-card bg-white rounded-lg overflow-hidden">
137
+ <img id="result-1" src="" alt="AI Clone 1" class="w-full h-48 object-cover">
138
+ <div class="p-4">
139
+ <p class="font-medium">Professional Headshot</p>
140
+ <button class="download-btn mt-2 text-sm text-purple-500 hover:text-purple-700" data-id="1">
141
+ <i class="fas fa-download mr-1"></i> Download
142
+ </button>
143
+ </div>
144
+ </div>
145
+ <div class="result-card bg-white rounded-lg overflow-hidden">
146
+ <img id="result-2" src="" alt="AI Clone 2" class="w-full h-48 object-cover">
147
+ <div class="p-4">
148
+ <p class="font-medium">Fantasy Character</p>
149
+ <button class="download-btn mt-2 text-sm text-purple-500 hover:text-purple-700" data-id="2">
150
+ <i class="fas fa-download mr-1"></i> Download
151
+ </button>
152
+ </div>
153
+ </div>
154
+ </div>
155
+
156
+ <div class="mb-6">
157
+ <label for="style-select" class="block text-sm font-medium text-gray-700 mb-2">Select Style</label>
158
+ <select id="style-select" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-purple-500 focus:border-purple-500">
159
+ <option value="professional">Professional</option>
160
+ <option value="fantasy">Fantasy</option>
161
+ <option value="anime">Anime</option>
162
+ <option value="watercolor">Watercolor</option>
163
+ <option value="cyberpunk">Cyberpunk</option>
164
+ </select>
165
+ </div>
166
+
167
+ <button id="regenerate-btn" class="w-full bg-purple-500 hover:bg-purple-600 text-white font-medium py-3 px-6 rounded-lg transition">
168
+ <i class="fas fa-sync-alt mr-2"></i> Regenerate with New Style
169
+ </button>
170
+ </div>
171
+
172
+ <div id="empty-result" class="flex flex-col items-center justify-center py-12">
173
+ <i class="fas fa-user-astronaut text-5xl text-gray-300 mb-4"></i>
174
+ <p class="text-gray-500">Your AI clone will appear here after processing</p>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </div>
179
+ </section>
180
+
181
+ <!-- Video Clone Section -->
182
+ <section id="video-clone" class="mb-20">
183
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden">
184
+ <div class="md:flex">
185
+ <!-- Prompt Area -->
186
+ <div class="md:w-1/2 p-8">
187
+ <h3 class="text-2xl font-bold mb-6">Create Your Video Clone</h3>
188
+ <p class="text-gray-600 mb-6">
189
+ Describe the scenario you want your digital twin to appear in.
190
+ </p>
191
+
192
+ <div class="mb-6">
193
+ <label for="video-prompt" class="block text-sm font-medium text-gray-700 mb-2">Describe the video</label>
194
+ <textarea id="video-prompt" rows="4" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-purple-500 focus:border-purple-500" placeholder="Example: A video of me giving a TED talk about artificial intelligence on a futuristic stage with holograms..."></textarea>
195
+ </div>
196
+
197
+ <div class="mb-6">
198
+ <label for="voice-select" class="block text-sm font-medium text-gray-700 mb-2">Select Voice</label>
199
+ <select id="voice-select" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-purple-500 focus:border-purple-500">
200
+ <option value="male1">Male Voice 1</option>
201
+ <option value="male2">Male Voice 2</option>
202
+ <option value="female1">Female Voice 1</option>
203
+ <option value="female2">Female Voice 2</option>
204
+ <option value="custom">Use My Voice (requires recording)</option>
205
+ </select>
206
+ </div>
207
+
208
+ <button id="generate-video-btn" class="w-full bg-purple-500 hover:bg-purple-600 text-white font-medium py-3 px-6 rounded-lg transition">
209
+ <i class="fas fa-video mr-2"></i> Generate Video
210
+ </button>
211
+
212
+ <div id="video-progress" class="hidden mt-6">
213
+ <p class="font-medium mb-2">Generating your video...</p>
214
+ <div class="progress-bar w-full mb-2">
215
+ <div id="video-progress-fill" class="progress-fill" style="width: 0%"></div>
216
+ </div>
217
+ <p id="video-progress-text" class="text-sm text-gray-500">0% complete</p>
218
+ <p class="text-sm text-gray-500 mt-2">This may take a few minutes. You can leave this page and we'll notify you when it's ready.</p>
219
+ </div>
220
+ </div>
221
+
222
+ <!-- Video Result Area -->
223
+ <div class="md:w-1/2 bg-gray-50 p-8">
224
+ <h3 class="text-2xl font-bold mb-6">Your Video Clone</h3>
225
+ <p class="text-gray-600 mb-6">
226
+ Your AI-generated video will appear here.
227
+ </p>
228
+
229
+ <div id="video-result" class="hidden">
230
+ <div class="video-container rounded-lg overflow-hidden mb-4">
231
+ <video id="generated-video" controls class="w-full">
232
+ Your browser does not support the video tag.
233
+ </video>
234
+ </div>
235
+
236
+ <div class="flex justify-between items-center">
237
+ <div>
238
+ <p class="font-medium" id="video-title">TED Talk about AI</p>
239
+ <p class="text-sm text-gray-500" id="video-duration">2:34</p>
240
+ </div>
241
+ <button id="download-video-btn" class="text-purple-500 hover:text-purple-700">
242
+ <i class="fas fa-download text-lg"></i>
243
+ </button>
244
+ </div>
245
+ </div>
246
+
247
+ <div id="empty-video" class="flex flex-col items-center justify-center py-12">
248
+ <i class="fas fa-film text-5xl text-gray-300 mb-4"></i>
249
+ <p class="text-gray-500">Your AI video will appear here after processing</p>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ </div>
254
+ </section>
255
+
256
+ <!-- About Section -->
257
+ <section id="about" class="bg-white rounded-xl shadow-lg p-8 mb-12">
258
+ <h3 class="text-2xl font-bold mb-6">About AI Clone Creator</h3>
259
+ <div class="prose max-w-none">
260
+ <p class="mb-4">
261
+ AI Clone Creator uses advanced artificial intelligence to generate realistic digital twins from just a single photo. Our technology can create images and videos of you in any scenario you imagine.
262
+ </p>
263
+ <p class="mb-4">
264
+ <strong>How it works:</strong> We analyze your facial features, expressions, and voice (if provided) to create a personalized AI model. This model can then generate new content featuring your digital twin.
265
+ </p>
266
+ <p class="mb-4">
267
+ <strong>Privacy:</strong> Your data is processed securely and never shared with third parties. You maintain full control over your digital twin.
268
+ </p>
269
+ <div class="bg-purple-50 border-l-4 border-purple-500 p-4 mb-4">
270
+ <p class="text-purple-700">
271
+ <strong>Note:</strong> The current version is a demonstration. Actual AI processing would require server-side implementation.
272
+ </p>
273
+ </div>
274
+ </div>
275
+ </section>
276
+ </main>
277
+
278
+ <!-- Footer -->
279
+ <footer class="bg-gray-800 text-white py-8">
280
+ <div class="container mx-auto px-4">
281
+ <div class="md:flex md:justify-between">
282
+ <div class="mb-6 md:mb-0">
283
+ <h4 class="text-xl font-bold mb-4">AI Clone Creator</h4>
284
+ <p class="text-gray-400">Create your digital twin with AI</p>
285
+ </div>
286
+ <div class="grid grid-cols-2 gap-8">
287
+ <div>
288
+ <h5 class="text-sm font-semibold uppercase tracking-wider mb-4">Links</h5>
289
+ <ul class="space-y-2">
290
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Home</a></li>
291
+ <li><a href="#image-clone" class="text-gray-400 hover:text-white transition">Image Clone</a></li>
292
+ <li><a href="#video-clone" class="text-gray-400 hover:text-white transition">Video Clone</a></li>
293
+ <li><a href="#about" class="text-gray-400 hover:text-white transition">About</a></li>
294
+ </ul>
295
+ </div>
296
+ <div>
297
+ <h5 class="text-sm font-semibold uppercase tracking-wider mb-4">Legal</h5>
298
+ <ul class="space-y-2">
299
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Privacy Policy</a></li>
300
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Terms of Service</a></li>
301
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Cookie Policy</a></li>
302
+ </ul>
303
+ </div>
304
+ </div>
305
+ </div>
306
+ <div class="mt-8 pt-8 border-t border-gray-700 text-center text-gray-400">
307
+ <p>&copy; 2023 AI Clone Creator. All rights reserved.</p>
308
+ </div>
309
+ </div>
310
+ </footer>
311
+
312
+ <script>
313
+ document.addEventListener('DOMContentLoaded', function() {
314
+ // Image Upload Functionality
315
+ const uploadContainer = document.getElementById('upload-container');
316
+ const uploadContent = document.getElementById('upload-content');
317
+ const uploadProgress = document.getElementById('upload-progress');
318
+ const uploadPreview = document.getElementById('upload-preview');
319
+ const imageUpload = document.getElementById('image-upload');
320
+ const uploadBtn = document.getElementById('upload-btn');
321
+ const generateBtn = document.getElementById('generate-btn');
322
+ const previewImage = document.getElementById('preview-image');
323
+ const resultArea = document.getElementById('result-area');
324
+ const emptyResult = document.getElementById('empty-result');
325
+ const progressFill = document.getElementById('progress-fill');
326
+ const progressText = document.getElementById('progress-text');
327
+ const result1 = document.getElementById('result-1');
328
+ const result2 = document.getElementById('result-2');
329
+ const regenerateBtn = document.getElementById('regenerate-btn');
330
+ const styleSelect = document.getElementById('style-select');
331
+
332
+ // Video Generation Functionality
333
+ const generateVideoBtn = document.getElementById('generate-video-btn');
334
+ const videoPrompt = document.getElementById('video-prompt');
335
+ const videoProgress = document.getElementById('video-progress');
336
+ const videoProgressFill = document.getElementById('video-progress-fill');
337
+ const videoProgressText = document.getElementById('video-progress-text');
338
+ const videoResult = document.getElementById('video-result');
339
+ const emptyVideo = document.getElementById('empty-video');
340
+ const generatedVideo = document.getElementById('generated-video');
341
+ const videoTitle = document.getElementById('video-title');
342
+ const videoDuration = document.getElementById('video-duration');
343
+ const downloadVideoBtn = document.getElementById('download-video-btn');
344
+
345
+ // Handle drag and drop
346
+ uploadContainer.addEventListener('dragover', (e) => {
347
+ e.preventDefault();
348
+ uploadContainer.classList.add('border-purple-500', 'bg-purple-50');
349
+ });
350
+
351
+ uploadContainer.addEventListener('dragleave', () => {
352
+ uploadContainer.classList.remove('border-purple-500', 'bg-purple-50');
353
+ });
354
+
355
+ uploadContainer.addEventListener('drop', (e) => {
356
+ e.preventDefault();
357
+ uploadContainer.classList.remove('border-purple-500', 'bg-purple-50');
358
+
359
+ if (e.dataTransfer.files.length) {
360
+ handleImageUpload(e.dataTransfer.files[0]);
361
+ }
362
+ });
363
+
364
+ // Handle file selection via button
365
+ uploadBtn.addEventListener('click', () => {
366
+ imageUpload.click();
367
+ });
368
+
369
+ imageUpload.addEventListener('change', (e) => {
370
+ if (e.target.files.length) {
371
+ handleImageUpload(e.target.files[0]);
372
+ }
373
+ });
374
+
375
+ // Process the uploaded image
376
+ function handleImageUpload(file) {
377
+ // Check if file is an image
378
+ if (!file.type.match('image.*')) {
379
+ alert('Please upload an image file (JPEG, PNG)');
380
+ return;
381
+ }
382
+
383
+ // Check file size (max 5MB)
384
+ if (file.size > 5 * 1024 * 1024) {
385
+ alert('File size exceeds 5MB limit');
386
+ return;
387
+ }
388
+
389
+ // Show upload progress
390
+ uploadContent.classList.add('hidden');
391
+ uploadProgress.classList.remove('hidden');
392
+
393
+ // Simulate upload progress
394
+ let progress = 0;
395
+ const progressInterval = setInterval(() => {
396
+ progress += Math.random() * 10;
397
+ if (progress > 100) progress = 100;
398
+
399
+ progressFill.style.width = `${progress}%`;
400
+ progressText.textContent = `${Math.round(progress)}% complete`;
401
+
402
+ if (progress === 100) {
403
+ clearInterval(progressInterval);
404
+
405
+ // Show preview after a short delay
406
+ setTimeout(() => {
407
+ const reader = new FileReader();
408
+ reader.onload = function(e) {
409
+ previewImage.src = e.target.result;
410
+ uploadProgress.classList.add('hidden');
411
+ uploadPreview.classList.remove('hidden');
412
+ };
413
+ reader.readAsDataURL(file);
414
+ }, 500);
415
+ }
416
+ }, 200);
417
+ }
418
+
419
+ // Generate AI clone images
420
+ generateBtn.addEventListener('click', function() {
421
+ // Simulate AI processing
422
+ uploadPreview.classList.add('hidden');
423
+ uploadProgress.classList.remove('hidden');
424
+ progressFill.style.width = '0%';
425
+ progressText.textContent = '0% complete';
426
+
427
+ let progress = 0;
428
+ const processingInterval = setInterval(() => {
429
+ progress += Math.random() * 5;
430
+ if (progress > 100) progress = 100;
431
+
432
+ progressFill.style.width = `${progress}%`;
433
+ progressText.textContent = `${Math.round(progress)}% complete`;
434
+
435
+ if (progress === 100) {
436
+ clearInterval(processingInterval);
437
+
438
+ // Show results after a short delay
439
+ setTimeout(() => {
440
+ uploadProgress.classList.add('hidden');
441
+ emptyResult.classList.add('hidden');
442
+ resultArea.classList.remove('hidden');
443
+
444
+ // Generate sample results (in a real app, these would come from an AI API)
445
+ result1.src = 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
446
+ result2.src = 'https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
447
+ }, 500);
448
+ }
449
+ }, 200);
450
+ });
451
+
452
+ // Regenerate with new style
453
+ regenerateBtn.addEventListener('click', function() {
454
+ const selectedStyle = styleSelect.value;
455
+
456
+ // Show processing
457
+ resultArea.classList.add('hidden');
458
+ uploadProgress.classList.remove('hidden');
459
+ progressFill.style.width = '0%';
460
+ progressText.textContent = '0% complete';
461
+
462
+ let progress = 0;
463
+ const processingInterval = setInterval(() => {
464
+ progress += Math.random() * 10;
465
+ if (progress > 100) progress = 100;
466
+
467
+ progressFill.style.width = `${progress}%`;
468
+ progressText.textContent = `${Math.round(progress)}% complete`;
469
+
470
+ if (progress === 100) {
471
+ clearInterval(processingInterval);
472
+
473
+ // Show new results after a short delay
474
+ setTimeout(() => {
475
+ uploadProgress.classList.add('hidden');
476
+ resultArea.classList.remove('hidden');
477
+
478
+ // Generate different sample results based on style
479
+ if (selectedStyle === 'professional') {
480
+ result1.src = 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
481
+ result2.src = 'https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
482
+ } else if (selectedStyle === 'fantasy') {
483
+ result1.src = 'https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
484
+ result2.src = 'https://images.unsplash.com/photo-1499996860823-5214fcc65f8f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
485
+ } else if (selectedStyle === 'anime') {
486
+ result1.src = 'https://images.unsplash.com/photo-1503249023995-51b0f3778ccb?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
487
+ result2.src = 'https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
488
+ } else if (selectedStyle === 'watercolor') {
489
+ result1.src = 'https://images.unsplash.com/photo-1524504388940-b1c1722653e1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
490
+ result2.src = 'https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
491
+ } else if (selectedStyle === 'cyberpunk') {
492
+ result1.src = 'https://images.unsplash.com/photo-1519085360753-af0119f7cbe7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
493
+ result2.src = 'https://images.unsplash.com/photo-1524504388940-b1c1722653e1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=400&q=80';
494
+ }
495
+ }, 500);
496
+ }
497
+ }, 200);
498
+ });
499
+
500
+ // Download image buttons
501
+ document.querySelectorAll('.download-btn').forEach(btn => {
502
+ btn.addEventListener('click', function() {
503
+ const id = this.getAttribute('data-id');
504
+ alert(`Downloading image ${id}. In a real app, this would trigger a download.`);
505
+ });
506
+ });
507
+
508
+ // Generate video from prompt
509
+ generateVideoBtn.addEventListener('click', function() {
510
+ const prompt = videoPrompt.value.trim();
511
+ const voice = document.getElementById('voice-select').value;
512
+
513
+ if (!prompt) {
514
+ alert('Please describe the video you want to generate');
515
+ return;
516
+ }
517
+
518
+ // Show processing
519
+ videoProgress.classList.remove('hidden');
520
+
521
+ // Simulate video generation progress
522
+ let progress = 0;
523
+ const videoInterval = setInterval(() => {
524
+ progress += Math.random() * 3;
525
+ if (progress > 100) progress = 100;
526
+
527
+ videoProgressFill.style.width = `${progress}%`;
528
+ videoProgressText.textContent = `${Math.round(progress)}% complete`;
529
+
530
+ if (progress === 100) {
531
+ clearInterval(videoInterval);
532
+
533
+ // Show video after a short delay
534
+ setTimeout(() => {
535
+ videoProgress.classList.add('hidden');
536
+ emptyVideo.classList.add('hidden');
537
+ videoResult.classList.remove('hidden');
538
+
539
+ // Set sample video (in a real app, this would be the generated video)
540
+ generatedVideo.src = 'https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4';
541
+ generatedVideo.load();
542
+
543
+ // Set video info
544
+ videoTitle.textContent = prompt.substring(0, 30) + (prompt.length > 30 ? '...' : '');
545
+ videoDuration.textContent = '1:45';
546
+ }, 1000);
547
+ }
548
+ }, 300);
549
+ });
550
+
551
+ // Download video button
552
+ downloadVideoBtn.addEventListener('click', function() {
553
+ alert('Downloading video. In a real app, this would trigger a download.');
554
+ });
555
+
556
+ // Smooth scrolling for navigation links
557
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
558
+ anchor.addEventListener('click', function(e) {
559
+ e.preventDefault();
560
+
561
+ const targetId = this.getAttribute('href');
562
+ const targetElement = document.querySelector(targetId);
563
+
564
+ if (targetElement) {
565
+ window.scrollTo({
566
+ top: targetElement.offsetTop - 80,
567
+ behavior: 'smooth'
568
+ });
569
+ }
570
+ });
571
+ });
572
+ });
573
+ </script>
574
+ <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=rahul7star/ai-clone" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
575
+ </html>