Spaces:
Running
Running
show grayout UI if user is not login so that they can still see all stuff - Initial Deployment
Browse files- README.md +6 -4
- index.html +563 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
colorFrom: green
|
5 |
-
colorTo:
|
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-me
|
3 |
+
emoji: 🐳
|
4 |
colorFrom: green
|
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,563 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 - Create Your Digital Twin</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, #f5f7fa 0%, #c3cfe2 100%);
|
12 |
+
}
|
13 |
+
.upload-area {
|
14 |
+
border: 2px dashed #cbd5e0;
|
15 |
+
transition: all 0.3s ease;
|
16 |
+
}
|
17 |
+
.upload-area:hover {
|
18 |
+
border-color: #667eea;
|
19 |
+
background-color: rgba(102, 126, 234, 0.05);
|
20 |
+
}
|
21 |
+
.progress-bar {
|
22 |
+
transition: width 0.5s ease;
|
23 |
+
}
|
24 |
+
.avatar-preview {
|
25 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
26 |
+
}
|
27 |
+
.plan-card {
|
28 |
+
transition: all 0.3s ease;
|
29 |
+
}
|
30 |
+
.plan-card:hover {
|
31 |
+
transform: translateY(-5px);
|
32 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
33 |
+
}
|
34 |
+
.selected-plan {
|
35 |
+
border-color: #667eea;
|
36 |
+
background-color: rgba(102, 126, 234, 0.05);
|
37 |
+
}
|
38 |
+
.toast {
|
39 |
+
animation: slideIn 0.5s, fadeOut 0.5s 2.5s;
|
40 |
+
}
|
41 |
+
@keyframes slideIn {
|
42 |
+
from { transform: translateX(100%); }
|
43 |
+
to { transform: translateX(0); }
|
44 |
+
}
|
45 |
+
@keyframes fadeOut {
|
46 |
+
from { opacity: 1; }
|
47 |
+
to { opacity: 0; }
|
48 |
+
}
|
49 |
+
</style>
|
50 |
+
</head>
|
51 |
+
<body class="gradient-bg min-h-screen">
|
52 |
+
<div class="container mx-auto px-4 py-8">
|
53 |
+
<!-- Header -->
|
54 |
+
<header class="flex justify-between items-center mb-12">
|
55 |
+
<div class="flex items-center">
|
56 |
+
<i class="fas fa-robot text-indigo-600 text-3xl mr-3"></i>
|
57 |
+
<h1 class="text-2xl font-bold text-gray-800">AI Clone</h1>
|
58 |
+
</div>
|
59 |
+
<div id="auth-section">
|
60 |
+
<button id="sign-in-btn" class="bg-white text-gray-700 px-6 py-2 rounded-full shadow-md hover:bg-gray-100 transition flex items-center">
|
61 |
+
<i class="fab fa-google text-red-500 mr-2"></i>
|
62 |
+
Sign In with Google
|
63 |
+
</button>
|
64 |
+
<div id="user-profile" class="hidden flex items-center">
|
65 |
+
<img id="user-avatar" class="w-10 h-10 rounded-full mr-3" src="" alt="User Avatar">
|
66 |
+
<span id="user-name" class="font-medium text-gray-700"></span>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</header>
|
70 |
+
|
71 |
+
<!-- Main Content -->
|
72 |
+
<main class="max-w-4xl mx-auto">
|
73 |
+
<!-- Upload Section -->
|
74 |
+
<section id="upload-section" class="hidden mb-12 bg-white rounded-xl shadow-lg p-6">
|
75 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">Create Your AI Clone</h2>
|
76 |
+
|
77 |
+
<div class="grid md:grid-cols-2 gap-6">
|
78 |
+
<!-- Image Upload -->
|
79 |
+
<div class="upload-area rounded-lg p-8 text-center cursor-pointer" id="image-upload">
|
80 |
+
<i class="fas fa-images text-indigo-500 text-4xl mb-4"></i>
|
81 |
+
<h3 class="text-lg font-medium text-gray-700 mb-2">Upload Images</h3>
|
82 |
+
<p class="text-gray-500 mb-4">Upload at least 5 images of yourself from different angles</p>
|
83 |
+
<input type="file" id="image-input" class="hidden" accept="image/*" multiple>
|
84 |
+
<button class="bg-indigo-100 text-indigo-600 px-4 py-2 rounded-full text-sm font-medium">
|
85 |
+
Select Files
|
86 |
+
</button>
|
87 |
+
</div>
|
88 |
+
|
89 |
+
<!-- ZIP Upload -->
|
90 |
+
<div class="upload-area rounded-lg p-8 text-center cursor-pointer" id="zip-upload">
|
91 |
+
<i class="fas fa-file-archive text-purple-500 text-4xl mb-4"></i>
|
92 |
+
<h3 class="text-lg font-medium text-gray-700 mb-2">Upload ZIP File</h3>
|
93 |
+
<p class="text-gray-500 mb-4">Compress your images into a single .zip file</p>
|
94 |
+
<input type="file" id="zip-input" class="hidden" accept=".zip">
|
95 |
+
<button class="bg-purple-100 text-purple-600 px-4 py-2 rounded-full text-sm font-medium">
|
96 |
+
Select ZIP File
|
97 |
+
</button>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<!-- Image Preview Carousel -->
|
102 |
+
<div id="image-preview-container" class="hidden mt-8">
|
103 |
+
<div class="flex justify-between items-center mb-4">
|
104 |
+
<h3 class="text-md font-medium text-gray-700">
|
105 |
+
<span id="image-count">0</span> images selected
|
106 |
+
</h3>
|
107 |
+
<button id="clear-images" class="text-red-500 text-sm font-medium">Clear all</button>
|
108 |
+
</div>
|
109 |
+
<div id="image-carousel" class="flex space-x-4 overflow-x-auto pb-4">
|
110 |
+
<!-- Images will be added here dynamically -->
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
|
114 |
+
<!-- Train Model Button -->
|
115 |
+
<div id="train-model-section" class="hidden mt-8 text-center">
|
116 |
+
<button id="train-model-btn" class="bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-8 py-3 rounded-full font-medium shadow-lg hover:opacity-90 transition">
|
117 |
+
Train Your AI Model
|
118 |
+
</button>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<!-- Training Progress -->
|
122 |
+
<div id="training-progress" class="hidden mt-8">
|
123 |
+
<div class="flex justify-between mb-2">
|
124 |
+
<span class="text-sm font-medium text-gray-700">Training in progress...</span>
|
125 |
+
<span id="progress-percent" class="text-sm font-medium text-gray-700">0%</span>
|
126 |
+
</div>
|
127 |
+
<div class="w-full bg-gray-200 rounded-full h-2.5">
|
128 |
+
<div id="progress-bar" class="bg-gradient-to-r from-indigo-500 to-purple-600 h-2.5 rounded-full progress-bar" style="width: 0%"></div>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</section>
|
132 |
+
|
133 |
+
<!-- AI Clone Results -->
|
134 |
+
<section id="results-section" class="hidden mb-12 bg-white rounded-xl shadow-lg p-6">
|
135 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">Your AI Clone Results</h2>
|
136 |
+
|
137 |
+
<div class="flex flex-col items-center">
|
138 |
+
<div class="avatar-preview w-64 h-64 rounded-full bg-gray-100 mb-6 overflow-hidden flex items-center justify-center">
|
139 |
+
<img id="generated-avatar" src="" alt="Generated Avatar" class="hidden w-full h-full object-cover">
|
140 |
+
<i class="fas fa-user text-gray-400 text-6xl" id="avatar-placeholder"></i>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<button id="recreate-btn" class="bg-indigo-600 text-white px-6 py-2 rounded-full font-medium hover:bg-indigo-700 transition">
|
144 |
+
<i class="fas fa-sync-alt mr-2"></i> Recreate
|
145 |
+
</button>
|
146 |
+
|
147 |
+
<div class="mt-6 flex space-x-4">
|
148 |
+
<button class="share-btn bg-blue-500 text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-blue-600 transition">
|
149 |
+
<i class="fab fa-twitter mr-2"></i> Share to Twitter
|
150 |
+
</button>
|
151 |
+
<button class="share-btn bg-pink-500 text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-pink-600 transition">
|
152 |
+
<i class="fab fa-instagram mr-2"></i> Share to Instagram
|
153 |
+
</button>
|
154 |
+
<button class="share-btn bg-gray-700 text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-gray-800 transition">
|
155 |
+
<i class="fas fa-link mr-2"></i> Copy Link
|
156 |
+
</button>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</section>
|
160 |
+
|
161 |
+
<!-- Bring Avatar to Life -->
|
162 |
+
<section id="animate-section" class="hidden mb-12 bg-white rounded-xl shadow-lg p-6">
|
163 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">Bring Your Avatar to Life</h2>
|
164 |
+
|
165 |
+
<div class="mb-6">
|
166 |
+
<label for="prompt-input" class="block text-sm font-medium text-gray-700 mb-2">Enter a prompt for your avatar</label>
|
167 |
+
<textarea id="prompt-input" rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-indigo-500 focus:border-indigo-500" placeholder="E.g., 'A professional headshot with a blue background'"></textarea>
|
168 |
+
</div>
|
169 |
+
|
170 |
+
<button id="generate-video-btn" class="bg-gradient-to-r from-purple-500 to-pink-600 text-white px-8 py-3 rounded-full font-medium shadow-lg hover:opacity-90 transition">
|
171 |
+
<i class="fas fa-film mr-2"></i> Generate Video
|
172 |
+
</button>
|
173 |
+
|
174 |
+
<!-- Video Loading -->
|
175 |
+
<div id="video-loading" class="hidden mt-8 text-center">
|
176 |
+
<div class="inline-block animate-spin rounded-full h-10 w-10 border-t-2 border-b-2 border-purple-500 mb-4"></div>
|
177 |
+
<p class="text-gray-700">Generating your animated avatar... This may take a few moments.</p>
|
178 |
+
</div>
|
179 |
+
|
180 |
+
<!-- Video Preview -->
|
181 |
+
<div id="video-preview" class="hidden mt-8">
|
182 |
+
<div class="bg-gray-100 rounded-xl overflow-hidden w-full aspect-video flex items-center justify-center">
|
183 |
+
<i class="fas fa-play-circle text-purple-500 text-6xl opacity-70" id="video-play-icon"></i>
|
184 |
+
</div>
|
185 |
+
<div class="mt-4 flex justify-center space-x-4">
|
186 |
+
<button class="share-btn bg-blue-500 text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-blue-600 transition">
|
187 |
+
<i class="fab fa-twitter mr-2"></i> Share
|
188 |
+
</button>
|
189 |
+
<button class="share-btn bg-pink-500 text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-pink-600 transition">
|
190 |
+
<i class="fab fa-instagram mr-2"></i> Share
|
191 |
+
</button>
|
192 |
+
<button class="share-btn bg-gray-700 text-white px-4 py-2 rounded-full text-sm font-medium hover:bg-gray-800 transition">
|
193 |
+
<i class="fas fa-download mr-2"></i> Download
|
194 |
+
</button>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</section>
|
198 |
+
|
199 |
+
<!-- Pricing Plans -->
|
200 |
+
<section id="pricing-section" class="hidden mb-12 bg-white rounded-xl shadow-lg p-6">
|
201 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-6">Choose Your Plan</h2>
|
202 |
+
|
203 |
+
<div class="grid md:grid-cols-3 gap-6">
|
204 |
+
<!-- Free Plan -->
|
205 |
+
<div class="plan-card border-2 border-gray-200 rounded-xl p-6 cursor-pointer" data-plan="free">
|
206 |
+
<div class="flex justify-between items-start mb-4">
|
207 |
+
<div>
|
208 |
+
<h3 class="text-lg font-bold text-gray-800">Free</h3>
|
209 |
+
<p class="text-gray-600 text-sm">Basic features</p>
|
210 |
+
</div>
|
211 |
+
<div class="text-right">
|
212 |
+
<span class="text-2xl font-bold text-gray-800">$0</span>
|
213 |
+
<span class="text-gray-500 text-sm">/month</span>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
<ul class="space-y-2 mb-6">
|
217 |
+
<li class="flex items-center text-gray-700">
|
218 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
219 |
+
<span>5 AI Generations</span>
|
220 |
+
</li>
|
221 |
+
<li class="flex items-center text-gray-700">
|
222 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
223 |
+
<span>Standard Quality</span>
|
224 |
+
</li>
|
225 |
+
<li class="flex items-center text-gray-500">
|
226 |
+
<i class="fas fa-times-circle text-gray-300 mr-2"></i>
|
227 |
+
<span>No Video Generation</span>
|
228 |
+
</li>
|
229 |
+
<li class="flex items-center text-gray-500">
|
230 |
+
<i class="fas fa-times-circle text-gray-300 mr-2"></i>
|
231 |
+
<span>No Priority Support</span>
|
232 |
+
</li>
|
233 |
+
</ul>
|
234 |
+
<button class="w-full border-2 border-gray-300 text-gray-700 py-2 rounded-lg font-medium hover:bg-gray-50 transition">
|
235 |
+
Current Plan
|
236 |
+
</button>
|
237 |
+
</div>
|
238 |
+
|
239 |
+
<!-- Pro Plan -->
|
240 |
+
<div class="plan-card border-2 border-indigo-300 rounded-xl p-6 cursor-pointer bg-indigo-50" data-plan="pro">
|
241 |
+
<div class="flex justify-between items-start mb-4">
|
242 |
+
<div>
|
243 |
+
<h3 class="text-lg font-bold text-gray-800">Pro</h3>
|
244 |
+
<p class="text-gray-600 text-sm">For creators</p>
|
245 |
+
</div>
|
246 |
+
<div class="text-right">
|
247 |
+
<span class="text-2xl font-bold text-gray-800">$19</span>
|
248 |
+
<span class="text-gray-500 text-sm">/month</span>
|
249 |
+
</div>
|
250 |
+
</div>
|
251 |
+
<ul class="space-y-2 mb-6">
|
252 |
+
<li class="flex items-center text-gray-700">
|
253 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
254 |
+
<span>100 AI Generations</span>
|
255 |
+
</li>
|
256 |
+
<li class="flex items-center text-gray-700">
|
257 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
258 |
+
<span>High Quality</span>
|
259 |
+
</li>
|
260 |
+
<li class="flex items-center text-gray-700">
|
261 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
262 |
+
<span>5 Video Generations</span>
|
263 |
+
</li>
|
264 |
+
<li class="flex items-center text-gray-500">
|
265 |
+
<i class="fas fa-times-circle text-gray-300 mr-2"></i>
|
266 |
+
<span>Standard Support</span>
|
267 |
+
</li>
|
268 |
+
</ul>
|
269 |
+
<button class="w-full bg-indigo-600 text-white py-2 rounded-lg font-medium hover:bg-indigo-700 transition">
|
270 |
+
Upgrade to Pro
|
271 |
+
</button>
|
272 |
+
</div>
|
273 |
+
|
274 |
+
<!-- Studio Plan -->
|
275 |
+
<div class="plan-card border-2 border-gray-200 rounded-xl p-6 cursor-pointer" data-plan="studio">
|
276 |
+
<div class="flex justify-between items-start mb-4">
|
277 |
+
<div>
|
278 |
+
<h3 class="text-lg font-bold text-gray-800">Studio</h3>
|
279 |
+
<p class="text-gray-600 text-sm">For professionals</p>
|
280 |
+
</div>
|
281 |
+
<div class="text-right">
|
282 |
+
<span class="text-2xl font-bold text-gray-800">$49</span>
|
283 |
+
<span class="text-gray-500 text-sm">/month</span>
|
284 |
+
</div>
|
285 |
+
</div>
|
286 |
+
<ul class="space-y-2 mb-6">
|
287 |
+
<li class="flex items-center text-gray-700">
|
288 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
289 |
+
<span>Unlimited Generations</span>
|
290 |
+
</li>
|
291 |
+
<li class="flex items-center text-gray-700">
|
292 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
293 |
+
<span>Ultra Quality</span>
|
294 |
+
</li>
|
295 |
+
<li class="flex items-center text-gray-700">
|
296 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
297 |
+
<span>Unlimited Videos</span>
|
298 |
+
</li>
|
299 |
+
<li class="flex items-center text-gray-700">
|
300 |
+
<i class="fas fa-check-circle text-green-500 mr-2"></i>
|
301 |
+
<span>Priority Support</span>
|
302 |
+
</li>
|
303 |
+
</ul>
|
304 |
+
<button class="w-full border-2 border-gray-300 text-gray-700 py-2 rounded-lg font-medium hover:bg-gray-50 transition">
|
305 |
+
Choose Studio
|
306 |
+
</button>
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
|
310 |
+
<!-- Plan Confirmation -->
|
311 |
+
<div id="plan-confirmation" class="hidden mt-6 p-4 bg-green-50 border border-green-200 rounded-lg text-center">
|
312 |
+
<div class="flex justify-center items-center text-green-600">
|
313 |
+
<i class="fas fa-check-circle text-2xl mr-2"></i>
|
314 |
+
<span class="font-medium">Your plan has been updated successfully!</span>
|
315 |
+
</div>
|
316 |
+
</div>
|
317 |
+
</section>
|
318 |
+
</main>
|
319 |
+
|
320 |
+
<!-- Toast Notification -->
|
321 |
+
<div id="toast" class="fixed bottom-4 right-4 hidden">
|
322 |
+
<div class="bg-gray-800 text-white px-6 py-3 rounded-lg shadow-lg flex items-center">
|
323 |
+
<i class="fas fa-check-circle text-green-400 mr-2"></i>
|
324 |
+
<span id="toast-message">Link copied to clipboard!</span>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
</div>
|
328 |
+
|
329 |
+
<script>
|
330 |
+
// Mock user data
|
331 |
+
const mockUser = {
|
332 |
+
name: "John Doe",
|
333 |
+
avatar: "https://randomuser.me/api/portraits/men/1.jpg"
|
334 |
+
};
|
335 |
+
|
336 |
+
// Mock generated avatars
|
337 |
+
const mockAvatars = [
|
338 |
+
"https://randomuser.me/api/portraits/men/2.jpg",
|
339 |
+
"https://randomuser.me/api/portraits/men/3.jpg",
|
340 |
+
"https://randomuser.me/api/portraits/men/4.jpg",
|
341 |
+
"https://randomuser.me/api/portraits/men/5.jpg"
|
342 |
+
];
|
343 |
+
|
344 |
+
// DOM Elements
|
345 |
+
const signInBtn = document.getElementById('sign-in-btn');
|
346 |
+
const userProfile = document.getElementById('user-profile');
|
347 |
+
const userName = document.getElementById('user-name');
|
348 |
+
const userAvatar = document.getElementById('user-avatar');
|
349 |
+
const uploadSection = document.getElementById('upload-section');
|
350 |
+
const imageUpload = document.getElementById('image-upload');
|
351 |
+
const zipUpload = document.getElementById('zip-upload');
|
352 |
+
const imageInput = document.getElementById('image-input');
|
353 |
+
const zipInput = document.getElementById('zip-input');
|
354 |
+
const imagePreviewContainer = document.getElementById('image-preview-container');
|
355 |
+
const imageCarousel = document.getElementById('image-carousel');
|
356 |
+
const imageCount = document.getElementById('image-count');
|
357 |
+
const clearImagesBtn = document.getElementById('clear-images');
|
358 |
+
const trainModelSection = document.getElementById('train-model-section');
|
359 |
+
const trainModelBtn = document.getElementById('train-model-btn');
|
360 |
+
const trainingProgress = document.getElementById('training-progress');
|
361 |
+
const progressBar = document.getElementById('progress-bar');
|
362 |
+
const progressPercent = document.getElementById('progress-percent');
|
363 |
+
const resultsSection = document.getElementById('results-section');
|
364 |
+
const generatedAvatar = document.getElementById('generated-avatar');
|
365 |
+
const avatarPlaceholder = document.getElementById('avatar-placeholder');
|
366 |
+
const recreateBtn = document.getElementById('recreate-btn');
|
367 |
+
const animateSection = document.getElementById('animate-section');
|
368 |
+
const promptInput = document.getElementById('prompt-input');
|
369 |
+
const generateVideoBtn = document.getElementById('generate-video-btn');
|
370 |
+
const videoLoading = document.getElementById('video-loading');
|
371 |
+
const videoPreview = document.getElementById('video-preview');
|
372 |
+
const pricingSection = document.getElementById('pricing-section');
|
373 |
+
const planCards = document.querySelectorAll('.plan-card');
|
374 |
+
const planConfirmation = document.getElementById('plan-confirmation');
|
375 |
+
const toast = document.getElementById('toast');
|
376 |
+
const toastMessage = document.getElementById('toast-message');
|
377 |
+
|
378 |
+
// State
|
379 |
+
let selectedImages = [];
|
380 |
+
let currentAvatarIndex = 0;
|
381 |
+
let selectedPlan = 'free';
|
382 |
+
|
383 |
+
// Event Listeners
|
384 |
+
signInBtn.addEventListener('click', handleSignIn);
|
385 |
+
imageUpload.addEventListener('click', () => imageInput.click());
|
386 |
+
zipUpload.addEventListener('click', () => zipInput.click());
|
387 |
+
imageInput.addEventListener('change', handleImageUpload);
|
388 |
+
zipInput.addEventListener('change', handleZipUpload);
|
389 |
+
clearImagesBtn.addEventListener('click', clearImages);
|
390 |
+
trainModelBtn.addEventListener('click', trainModel);
|
391 |
+
recreateBtn.addEventListener('click', recreateAvatar);
|
392 |
+
generateVideoBtn.addEventListener('click', generateVideo);
|
393 |
+
planCards.forEach(card => card.addEventListener('click', () => selectPlan(card.dataset.plan)));
|
394 |
+
document.querySelectorAll('.share-btn').forEach(btn => btn.addEventListener('click', showToast));
|
395 |
+
|
396 |
+
// Functions
|
397 |
+
function handleSignIn() {
|
398 |
+
// Mock Google sign in
|
399 |
+
signInBtn.classList.add('hidden');
|
400 |
+
userProfile.classList.remove('hidden');
|
401 |
+
|
402 |
+
userName.textContent = mockUser.name;
|
403 |
+
userAvatar.src = mockUser.avatar;
|
404 |
+
|
405 |
+
// Show upload section after sign in
|
406 |
+
uploadSection.classList.remove('hidden');
|
407 |
+
animateSection.classList.remove('hidden');
|
408 |
+
pricingSection.classList.remove('hidden');
|
409 |
+
}
|
410 |
+
|
411 |
+
function handleImageUpload(e) {
|
412 |
+
const files = Array.from(e.target.files);
|
413 |
+
|
414 |
+
if (files.length < 5) {
|
415 |
+
alert('Please upload at least 5 images');
|
416 |
+
return;
|
417 |
+
}
|
418 |
+
|
419 |
+
selectedImages = files.slice(0, 5); // Limit to 5 images
|
420 |
+
updateImagePreview();
|
421 |
+
|
422 |
+
// Show the train model button if we have enough images
|
423 |
+
trainModelSection.classList.remove('hidden');
|
424 |
+
}
|
425 |
+
|
426 |
+
function handleZipUpload(e) {
|
427 |
+
if (e.target.files.length > 0) {
|
428 |
+
// Show the train model button when ZIP is uploaded
|
429 |
+
trainModelSection.classList.remove('hidden');
|
430 |
+
showToast("ZIP file uploaded successfully!");
|
431 |
+
}
|
432 |
+
}
|
433 |
+
|
434 |
+
function updateImagePreview() {
|
435 |
+
imageCarousel.innerHTML = '';
|
436 |
+
imageCount.textContent = selectedImages.length;
|
437 |
+
|
438 |
+
selectedImages.forEach((file, index) => {
|
439 |
+
const reader = new FileReader();
|
440 |
+
reader.onload = (e) => {
|
441 |
+
const imgContainer = document.createElement('div');
|
442 |
+
imgContainer.className = 'flex-shrink-0 relative';
|
443 |
+
|
444 |
+
const img = document.createElement('img');
|
445 |
+
img.src = e.target.result;
|
446 |
+
img.className = 'w-24 h-24 rounded-lg object-cover';
|
447 |
+
img.alt = `Preview ${index + 1}`;
|
448 |
+
|
449 |
+
imgContainer.appendChild(img);
|
450 |
+
imageCarousel.appendChild(imgContainer);
|
451 |
+
};
|
452 |
+
reader.readAsDataURL(file);
|
453 |
+
});
|
454 |
+
|
455 |
+
imagePreviewContainer.classList.remove('hidden');
|
456 |
+
}
|
457 |
+
|
458 |
+
function clearImages() {
|
459 |
+
selectedImages = [];
|
460 |
+
imageInput.value = '';
|
461 |
+
imagePreviewContainer.classList.add('hidden');
|
462 |
+
trainModelSection.classList.add('hidden');
|
463 |
+
}
|
464 |
+
|
465 |
+
function trainModel() {
|
466 |
+
// Show training progress
|
467 |
+
trainingProgress.classList.remove('hidden');
|
468 |
+
trainModelSection.classList.add('hidden');
|
469 |
+
|
470 |
+
// Simulate training progress
|
471 |
+
let progress = 0;
|
472 |
+
const interval = setInterval(() => {
|
473 |
+
progress += Math.random() * 10;
|
474 |
+
if (progress > 100) progress = 100;
|
475 |
+
|
476 |
+
progressBar.style.width = `${progress}%`;
|
477 |
+
progressPercent.textContent = `${Math.floor(progress)}%`;
|
478 |
+
|
479 |
+
if (progress === 100) {
|
480 |
+
clearInterval(interval);
|
481 |
+
setTimeout(() => {
|
482 |
+
trainingProgress.classList.add('hidden');
|
483 |
+
showResults();
|
484 |
+
}, 500);
|
485 |
+
}
|
486 |
+
}, 500);
|
487 |
+
}
|
488 |
+
|
489 |
+
function showResults() {
|
490 |
+
resultsSection.classList.remove('hidden');
|
491 |
+
currentAvatarIndex = 0;
|
492 |
+
displayGeneratedAvatar();
|
493 |
+
}
|
494 |
+
|
495 |
+
function displayGeneratedAvatar() {
|
496 |
+
avatarPlaceholder.classList.add('hidden');
|
497 |
+
generatedAvatar.classList.remove('hidden');
|
498 |
+
generatedAvatar.src = mockAvatars[currentAvatarIndex];
|
499 |
+
}
|
500 |
+
|
501 |
+
function recreateAvatar() {
|
502 |
+
avatarPlaceholder.classList.remove('hidden');
|
503 |
+
generatedAvatar.classList.add('hidden');
|
504 |
+
|
505 |
+
// Simulate loading
|
506 |
+
setTimeout(() => {
|
507 |
+
currentAvatarIndex = (currentAvatarIndex + 1) % mockAvatars.length;
|
508 |
+
displayGeneratedAvatar();
|
509 |
+
showToast("New avatar generated!");
|
510 |
+
}, 800);
|
511 |
+
}
|
512 |
+
|
513 |
+
function generateVideo() {
|
514 |
+
if (!promptInput.value.trim()) {
|
515 |
+
showToast("Please enter a prompt first");
|
516 |
+
return;
|
517 |
+
}
|
518 |
+
|
519 |
+
videoLoading.classList.remove('hidden');
|
520 |
+
videoPreview.classList.add('hidden');
|
521 |
+
|
522 |
+
// Simulate video generation
|
523 |
+
setTimeout(() => {
|
524 |
+
videoLoading.classList.add('hidden');
|
525 |
+
videoPreview.classList.remove('hidden');
|
526 |
+
showToast("Video generated successfully!");
|
527 |
+
}, 3000);
|
528 |
+
}
|
529 |
+
|
530 |
+
function selectPlan(plan) {
|
531 |
+
selectedPlan = plan;
|
532 |
+
|
533 |
+
// Update UI
|
534 |
+
planCards.forEach(card => {
|
535 |
+
if (card.dataset.plan === plan) {
|
536 |
+
card.classList.add('selected-plan');
|
537 |
+
card.querySelector('button').classList.add('bg-indigo-600', 'text-white');
|
538 |
+
card.querySelector('button').classList.remove('border-gray-300', 'text-gray-700');
|
539 |
+
} else {
|
540 |
+
card.classList.remove('selected-plan');
|
541 |
+
card.querySelector('button').classList.remove('bg-indigo-600', 'text-white');
|
542 |
+
card.querySelector('button').classList.add('border-gray-300', 'text-gray-700');
|
543 |
+
}
|
544 |
+
});
|
545 |
+
|
546 |
+
// Show confirmation
|
547 |
+
planConfirmation.classList.remove('hidden');
|
548 |
+
setTimeout(() => {
|
549 |
+
planConfirmation.classList.add('hidden');
|
550 |
+
}, 3000);
|
551 |
+
}
|
552 |
+
|
553 |
+
function showToast(message) {
|
554 |
+
toastMessage.textContent = message;
|
555 |
+
toast.classList.remove('hidden');
|
556 |
+
|
557 |
+
setTimeout(() => {
|
558 |
+
toast.classList.add('hidden');
|
559 |
+
}, 3000);
|
560 |
+
}
|
561 |
+
</script>
|
562 |
+
<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-me" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
563 |
+
</html>
|