kjamin commited on
Commit
52fe36d
·
verified ·
1 Parent(s): f85b4b9

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +307 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Kjamins
3
- emoji:
4
- colorFrom: green
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: kjamins
3
+ emoji: 🐳
4
+ colorFrom: yellow
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,307 @@
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>ImaginAI - AI Image Generator</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
+ @keyframes pulse {
11
+ 0%, 100% { opacity: 1; }
12
+ 50% { opacity: 0.5; }
13
+ }
14
+ .animate-pulse {
15
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
16
+ }
17
+ .gradient-bg {
18
+ background: linear-gradient(135deg, #6e8efb, #a777e3);
19
+ }
20
+ .result-image {
21
+ transition: all 0.3s ease;
22
+ }
23
+ .result-image:hover {
24
+ transform: scale(1.02);
25
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
26
+ }
27
+ .prompt-input:focus {
28
+ box-shadow: 0 0 0 3px rgba(167, 119, 227, 0.3);
29
+ }
30
+ </style>
31
+ </head>
32
+ <body class="bg-gray-50 min-h-screen font-sans">
33
+ <div class="gradient-bg text-white py-4 shadow-lg">
34
+ <div class="container mx-auto px-4">
35
+ <div class="flex justify-between items-center">
36
+ <div class="flex items-center space-x-2">
37
+ <i class="fas fa-robot text-3xl"></i>
38
+ <h1 class="text-2xl font-bold">ImaginAI</h1>
39
+ </div>
40
+ <div class="hidden md:flex space-x-4">
41
+ <a href="#" class="hover:text-gray-200 transition">Home</a>
42
+ <a href="#" class="hover:text-gray-200 transition">Gallery</a>
43
+ <a href="#" class="hover:text-gray-200 transition">About</a>
44
+ </div>
45
+ <button class="md:hidden text-xl">
46
+ <i class="fas fa-bars"></i>
47
+ </button>
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+ <main class="container mx-auto px-4 py-8">
53
+ <div class="max-w-4xl mx-auto text-center mb-12">
54
+ <h2 class="text-4xl font-bold text-gray-800 mb-4">Generate Stunning AI Art</h2>
55
+ <p class="text-xl text-gray-600">Describe your imagination and let our AI bring it to life</p>
56
+ </div>
57
+
58
+ <div class="bg-white rounded-xl shadow-lg p-6 mb-8">
59
+ <div class="flex flex-col md:flex-row gap-6">
60
+ <div class="flex-1">
61
+ <div class="mb-6">
62
+ <label for="prompt" class="block text-gray-700 font-medium mb-2">Your Imagination</label>
63
+ <textarea
64
+ id="prompt"
65
+ rows="4"
66
+ class="w-full px-4 py-3 border border-gray-300 rounded-lg prompt-input focus:outline-none focus:border-purple-500 transition"
67
+ placeholder="A majestic lion wearing a crown in the style of renaissance painting..."></textarea>
68
+ </div>
69
+
70
+ <div class="grid grid-cols-2 gap-4 mb-6">
71
+ <div>
72
+ <label for="style" class="block text-gray-700 font-medium mb-2">Art Style</label>
73
+ <select id="style" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:border-purple-500 transition">
74
+ <option value="realistic">Realistic</option>
75
+ <option value="fantasy">Fantasy</option>
76
+ <option value="anime">Anime</option>
77
+ <option value="watercolor">Watercolor</option>
78
+ <option value="oil-painting">Oil Painting</option>
79
+ <option value="digital-art">Digital Art</option>
80
+ </select>
81
+ </div>
82
+ <div>
83
+ <label for="quality" class="block text-gray-700 font-medium mb-2">Quality</label>
84
+ <select id="quality" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:border-purple-500 transition">
85
+ <option value="standard">Standard</option>
86
+ <option value="hd">HD</option>
87
+ <option value="ultra-hd">Ultra HD</option>
88
+ </select>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="mb-6">
93
+ <label class="block text-gray-700 font-medium mb-2">Advanced Options</label>
94
+ <div class="flex flex-wrap gap-3">
95
+ <label class="inline-flex items-center">
96
+ <input type="checkbox" class="rounded text-purple-500 focus:ring-purple-500">
97
+ <span class="ml-2 text-gray-600">High Detail</span>
98
+ </label>
99
+ <label class="inline-flex items-center">
100
+ <input type="checkbox" class="rounded text-purple-500 focus:ring-purple-500">
101
+ <span class="ml-2 text-gray-600">Dramatic Lighting</span>
102
+ </label>
103
+ <label class="inline-flex items-center">
104
+ <input type="checkbox" class="rounded text-purple-500 focus:ring-purple-500">
105
+ <span class="ml-2 text-gray-600">Symmetrical</span>
106
+ </label>
107
+ </div>
108
+ </div>
109
+
110
+ <button id="generate-btn" class="w-full gradient-bg text-white font-bold py-3 px-6 rounded-lg hover:opacity-90 transition flex items-center justify-center">
111
+ <i class="fas fa-magic mr-2"></i> Generate Image
112
+ </button>
113
+ </div>
114
+
115
+ <div class="flex-1">
116
+ <div class="border-2 border-dashed border-gray-300 rounded-xl h-full flex items-center justify-center bg-gray-50 min-h-[300px]">
117
+ <div id="image-container" class="p-4 w-full h-full flex items-center justify-center">
118
+ <div id="placeholder" class="text-center">
119
+ <i class="fas fa-image text-5xl text-gray-400 mb-4"></i>
120
+ <p class="text-gray-500">Your generated image will appear here</p>
121
+ </div>
122
+ <div id="loading" class="hidden text-center">
123
+ <div class="animate-pulse mb-4">
124
+ <i class="fas fa-spinner fa-spin text-5xl text-purple-500"></i>
125
+ </div>
126
+ <p class="text-gray-600">Creating your masterpiece...</p>
127
+ <p class="text-sm text-gray-500 mt-2">This usually takes 10-30 seconds</p>
128
+ </div>
129
+ <img id="result-image" class="hidden max-w-full max-h-[400px] rounded-lg result-image" src="" alt="Generated image">
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ </div>
135
+
136
+ <div class="mb-12">
137
+ <h3 class="text-2xl font-bold text-gray-800 mb-6">Inspiration Gallery</h3>
138
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
139
+ <div class="bg-white p-3 rounded-lg shadow hover:shadow-lg transition cursor-pointer" onclick="useExample('A cyberpunk cityscape at night with neon lights reflecting on wet streets')">
140
+ <img src="https://images.unsplash.com/photo-1518455027359-f3f8164ba6bd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" alt="Cyberpunk city" class="w-full h-32 object-cover rounded mb-2">
141
+ <p class="text-sm text-gray-600">Cyberpunk City</p>
142
+ </div>
143
+ <div class="bg-white p-3 rounded-lg shadow hover:shadow-lg transition cursor-pointer" onclick="useExample('A mystical forest with glowing mushrooms and fairies, digital art style')">
144
+ <img src="https://images.unsplash.com/photo-1531279557251-b3854307669c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" alt="Mystical forest" class="w-full h-32 object-cover rounded mb-2">
145
+ <p class="text-sm text-gray-600">Mystical Forest</p>
146
+ </div>
147
+ <div class="bg-white p-3 rounded-lg shadow hover:shadow-lg transition cursor-pointer" onclick="useExample('A futuristic spaceship landing on an alien planet with three moons in the sky')">
148
+ <img src="https://images.unsplash.com/photo-1457364887197-9150188c107b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" alt="Futuristic spaceship" class="w-full h-32 object-cover rounded mb-2">
149
+ <p class="text-sm text-gray-600">Alien Planet</p>
150
+ </div>
151
+ <div class="bg-white p-3 rounded-lg shadow hover:shadow-lg transition cursor-pointer" onclick="useExample('A portrait of a beautiful elven queen with intricate jewelry, fantasy style')">
152
+ <img src="https://images.unsplash.com/photo-1534447677768-be436bb09401?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80" alt="Elven queen" class="w-full h-32 object-cover rounded mb-2">
153
+ <p class="text-sm text-gray-600">Elven Queen</p>
154
+ </div>
155
+ </div>
156
+ </div>
157
+
158
+ <div class="bg-white rounded-xl shadow-lg p-6">
159
+ <h3 class="text-2xl font-bold text-gray-800 mb-4">Your Recent Creations</h3>
160
+ <div id="history" class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
161
+ <div class="text-center py-8 text-gray-400">
162
+ <i class="fas fa-history text-3xl mb-2"></i>
163
+ <p>Your generated images will appear here</p>
164
+ </div>
165
+ </div>
166
+ </div>
167
+ </main>
168
+
169
+ <footer class="bg-gray-800 text-white py-8">
170
+ <div class="container mx-auto px-4">
171
+ <div class="flex flex-col md:flex-row justify-between items-center">
172
+ <div class="mb-4 md:mb-0">
173
+ <div class="flex items-center space-x-2">
174
+ <i class="fas fa-robot text-2xl"></i>
175
+ <span class="text-xl font-bold">ImaginAI</span>
176
+ </div>
177
+ <p class="text-gray-400 mt-2">Bringing your imagination to life</p>
178
+ </div>
179
+ <div class="flex space-x-6">
180
+ <a href="#" class="hover:text-purple-300 transition"><i class="fab fa-twitter"></i></a>
181
+ <a href="#" class="hover:text-purple-300 transition"><i class="fab fa-instagram"></i></a>
182
+ <a href="#" class="hover:text-purple-300 transition"><i class="fab fa-discord"></i></a>
183
+ <a href="#" class="hover:text-purple-300 transition"><i class="fab fa-github"></i></a>
184
+ </div>
185
+ </div>
186
+ <div class="border-t border-gray-700 mt-6 pt-6 text-center text-gray-400">
187
+ <p>&copy; 2023 ImaginAI. All rights reserved.</p>
188
+ </div>
189
+ </div>
190
+ </footer>
191
+
192
+ <script>
193
+ // This is a mock implementation since we can't actually call AI APIs in this demo
194
+ // In a real app, you would call an API like OpenAI's DALL-E, Stable Diffusion, etc.
195
+
196
+ const generateBtn = document.getElementById('generate-btn');
197
+ const promptInput = document.getElementById('prompt');
198
+ const styleSelect = document.getElementById('style');
199
+ const qualitySelect = document.getElementById('quality');
200
+ const placeholder = document.getElementById('placeholder');
201
+ const loading = document.getElementById('loading');
202
+ const resultImage = document.getElementById('result-image');
203
+ const historyContainer = document.getElementById('history');
204
+
205
+ // Sample images for demonstration
206
+ const sampleImages = [
207
+ 'https://images.unsplash.com/photo-1682686580391-615b4f716f24?ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80',
208
+ 'https://images.unsplash.com/photo-1682695796954-bad0d0f59ff1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80',
209
+ 'https://images.unsplash.com/photo-1682686580391-615b4f716f24?ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80',
210
+ 'https://images.unsplash.com/photo-1682695796954-bad0d0f59ff1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=500&q=80'
211
+ ];
212
+
213
+ // Generate a random image from Unsplash based on prompt
214
+ function generateRandomImage(prompt) {
215
+ const randomNum = Math.floor(Math.random() * 1000);
216
+ return `https://source.unsplash.com/random/500x500/?${encodeURIComponent(prompt)}&${randomNum}`;
217
+ }
218
+
219
+ // Use example from gallery
220
+ function useExample(prompt) {
221
+ promptInput.value = prompt;
222
+ }
223
+
224
+ // Generate image
225
+ generateBtn.addEventListener('click', () => {
226
+ const prompt = promptInput.value.trim();
227
+ const style = styleSelect.value;
228
+ const quality = qualitySelect.value;
229
+
230
+ if (!prompt) {
231
+ alert('Please enter a description for your image');
232
+ return;
233
+ }
234
+
235
+ // Show loading state
236
+ placeholder.classList.add('hidden');
237
+ loading.classList.remove('hidden');
238
+ resultImage.classList.add('hidden');
239
+
240
+ // Simulate API call delay
241
+ setTimeout(() => {
242
+ // For demo purposes, we'll use a random Unsplash image
243
+ // In a real app, you would call an AI image generation API here
244
+ const imageUrl = generateRandomImage(prompt);
245
+
246
+ // Display result
247
+ resultImage.src = imageUrl;
248
+ loading.classList.add('hidden');
249
+ resultImage.classList.remove('hidden');
250
+
251
+ // Add to history
252
+ addToHistory(prompt, imageUrl);
253
+ }, 2000 + Math.random() * 3000); // Random delay between 2-5 seconds
254
+ });
255
+
256
+ // Add generated image to history
257
+ function addToHistory(prompt, imageUrl) {
258
+ // Create history item
259
+ const historyItem = document.createElement('div');
260
+ historyItem.className = 'bg-white rounded-lg overflow-hidden shadow hover:shadow-lg transition cursor-pointer';
261
+ historyItem.innerHTML = `
262
+ <img src="${imageUrl}" alt="${prompt}" class="w-full h-32 object-cover">
263
+ <div class="p-3">
264
+ <p class="text-sm text-gray-600 truncate">${prompt}</p>
265
+ <div class="flex justify-between items-center mt-2">
266
+ <span class="text-xs text-gray-500">${new Date().toLocaleDateString()}</span>
267
+ <button class="text-purple-500 hover:text-purple-700">
268
+ <i class="fas fa-download"></i>
269
+ </button>
270
+ </div>
271
+ </div>
272
+ `;
273
+
274
+ // If history is empty, remove the placeholder
275
+ if (historyContainer.children.length === 1 &&
276
+ historyContainer.children[0].querySelector('i.fa-history')) {
277
+ historyContainer.innerHTML = '';
278
+ }
279
+
280
+ // Add to beginning of history
281
+ historyContainer.prepend(historyItem);
282
+
283
+ // Limit history to 12 items
284
+ if (historyContainer.children.length > 12) {
285
+ historyContainer.removeChild(historyContainer.lastChild);
286
+ }
287
+ }
288
+
289
+ // Initialize with some sample history items for demo
290
+ function initDemoHistory() {
291
+ const samplePrompts = [
292
+ "A beautiful sunset over mountains",
293
+ "Futuristic city with flying cars",
294
+ "Magical unicorn in a enchanted forest",
295
+ "Steampunk airship in the clouds"
296
+ ];
297
+
298
+ samplePrompts.forEach((prompt, index) => {
299
+ addToHistory(prompt, sampleImages[index % sampleImages.length]);
300
+ });
301
+ }
302
+
303
+ // Initialize demo data
304
+ initDemoHistory();
305
+ </script>
306
+ <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=kjamin/kjamins" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
307
+ </html>
prompts.txt ADDED
File without changes