rahul7star commited on
Commit
1375cd0
·
verified ·
1 Parent(s): 1414213

Continue updating these info- Add upload ZIP option in UI . Add pricing options , add sign in options which will show gmail option and login will work. Show a progress bar when image is uploaded . Show create avatar button that will trigger a API (mock ) and also when user see AI Clone results - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +118 -5
index.html CHANGED
@@ -58,10 +58,16 @@
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>
@@ -98,18 +104,27 @@
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">
@@ -118,8 +133,9 @@
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>
@@ -418,7 +434,27 @@
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%';
@@ -571,5 +607,82 @@
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>
 
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 items-center">
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="#pricing" class="hover:text-gray-200 transition">Pricing</a></li>
65
  <li><a href="#about" class="hover:text-gray-200 transition">About</a></li>
66
+ <li>
67
+ <button id="signin-btn" class="bg-white text-purple-600 hover:bg-gray-100 font-medium py-2 px-4 rounded-full transition">
68
+ Sign In
69
+ </button>
70
+ </li>
71
  </ul>
72
  </nav>
73
  </div>
 
104
  <button id="upload-btn" class="bg-purple-500 hover:bg-purple-600 text-white font-medium py-2 px-6 rounded-full transition">
105
  Browse Files
106
  </button>
107
+ <p class="text-sm text-gray-500 mt-2">JPEG, PNG or ZIP (multiple images) up to 5MB</p>
108
+ <div class="mt-4 text-xs text-gray-500">
109
+ <p>For best results, upload a ZIP containing:</p>
110
+ <ul class="list-disc pl-5 mt-1">
111
+ <li>10-20 high-quality photos</li>
112
+ <li>Different angles and expressions</li>
113
+ <li>Good lighting conditions</li>
114
+ </ul>
115
+ </div>
116
  </div>
117
 
118
  <div id="upload-progress" class="hidden">
119
  <div class="flex items-center justify-center mb-4">
120
  <div class="w-16 h-16 border-4 border-purple-500 border-t-transparent rounded-full animate-spin"></div>
121
  </div>
122
+ <p class="font-medium mb-2">Training your AI model...</p>
123
  <div class="progress-bar w-full mb-2">
124
  <div id="progress-fill" class="progress-fill" style="width: 0%"></div>
125
  </div>
126
  <p id="progress-text" class="text-sm text-gray-500">0% complete</p>
127
+ <p class="text-xs text-gray-500 mt-1">Processing 20 facial features...</p>
128
  </div>
129
 
130
  <div id="upload-preview" class="hidden">
 
133
  </div>
134
  <p class="font-medium mb-2">Image uploaded successfully!</p>
135
  <button id="generate-btn" class="bg-purple-500 hover:bg-purple-600 text-white font-medium py-2 px-6 rounded-full transition">
136
+ Create Avatar
137
  </button>
138
+ <p class="text-xs text-gray-500 mt-2">This may take 1-2 minutes</p>
139
  </div>
140
  </div>
141
  </div>
 
434
 
435
  // Generate AI clone images
436
  generateBtn.addEventListener('click', function() {
437
+ // Mock API call to create avatar
438
+ const mockApiCall = () => {
439
+ return new Promise((resolve) => {
440
+ let progress = 0;
441
+ const interval = setInterval(() => {
442
+ progress += Math.random() * 5;
443
+ if (progress > 100) progress = 100;
444
+
445
+ progressFill.style.width = `${progress}%`;
446
+ progressText.textContent = `${Math.round(progress)}% complete`;
447
+
448
+ if (progress === 100) {
449
+ clearInterval(interval);
450
+ resolve();
451
+ }
452
+ }, 200);
453
+ });
454
+ };
455
+
456
+ // Simulate AI processing with mock API
457
+ mockApiCall().then(() => {
458
  uploadPreview.classList.add('hidden');
459
  uploadProgress.classList.remove('hidden');
460
  progressFill.style.width = '0%';
 
607
  });
608
  });
609
  </script>
610
+
611
+ <!-- Sign In Modal -->
612
+ <div id="signin-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
613
+ <div class="bg-white rounded-xl p-8 w-full max-w-md">
614
+ <div class="flex justify-between items-center mb-6">
615
+ <h3 class="text-2xl font-bold">Sign In</h3>
616
+ <button id="close-modal" class="text-gray-500 hover:text-gray-700">
617
+ <i class="fas fa-times"></i>
618
+ </button>
619
+ </div>
620
+
621
+ <button id="google-signin" class="w-full bg-white border border-gray-300 hover:bg-gray-50 text-gray-700 font-medium py-3 px-4 rounded-lg flex items-center justify-center transition mb-4">
622
+ <img src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" alt="Google" class="w-5 h-5 mr-2">
623
+ Continue with Google
624
+ </button>
625
+
626
+ <div class="relative my-6">
627
+ <div class="absolute inset-0 flex items-center">
628
+ <div class="w-full border-t border-gray-300"></div>
629
+ </div>
630
+ <div class="relative flex justify-center text-sm">
631
+ <span class="px-2 bg-white text-gray-500">or</span>
632
+ </div>
633
+ </div>
634
+
635
+ <form id="email-signin" class="space-y-4">
636
+ <div>
637
+ <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
638
+ <input type="email" id="email" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-purple-500 focus:border-purple-500" placeholder="[email protected]" required>
639
+ </div>
640
+ <div>
641
+ <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
642
+ <input type="password" id="password" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-purple-500 focus:border-purple-500" placeholder="••••••••" required>
643
+ </div>
644
+ <button type="submit" class="w-full bg-purple-500 hover:bg-purple-600 text-white font-medium py-3 px-4 rounded-lg transition">
645
+ Sign In
646
+ </button>
647
+ </form>
648
+
649
+ <p class="text-sm text-gray-500 mt-4 text-center">
650
+ Don't have an account? <a href="#" class="text-purple-500 hover:text-purple-700">Sign up</a>
651
+ </p>
652
+ </div>
653
+ </div>
654
+
655
+ <script>
656
+ // Sign in modal functionality
657
+ const signinBtn = document.getElementById('signin-btn');
658
+ const signinModal = document.getElementById('signin-modal');
659
+ const closeModal = document.getElementById('close-modal');
660
+ const googleSignin = document.getElementById('google-signin');
661
+ const emailSignin = document.getElementById('email-signin');
662
+
663
+ signinBtn.addEventListener('click', () => {
664
+ signinModal.classList.remove('hidden');
665
+ });
666
+
667
+ closeModal.addEventListener('click', () => {
668
+ signinModal.classList.add('hidden');
669
+ });
670
+
671
+ googleSignin.addEventListener('click', () => {
672
+ // In a real app, this would trigger Google OAuth flow
673
+ alert('Redirecting to Google sign in...');
674
+ });
675
+
676
+ emailSignin.addEventListener('submit', (e) => {
677
+ e.preventDefault();
678
+ const email = document.getElementById('email').value;
679
+ const password = document.getElementById('password').value;
680
+
681
+ // Mock login - in a real app this would call your backend
682
+ alert(`Mock login with email: ${email}`);
683
+ signinModal.classList.add('hidden');
684
+ signinBtn.textContent = 'My Account';
685
+ });
686
+ </script>
687
  <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>
688
  </html>