SungSolo commited on
Commit
121061f
·
verified ·
1 Parent(s): 3811f5a

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +416 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Img2imgnsfw
3
- emoji: 📈
4
- colorFrom: yellow
5
- colorTo: blue
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: img2imgnsfw
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: green
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,416 @@
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>NSFW 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
+ .dropzone {
11
+ border: 2px dashed #6366f1;
12
+ border-radius: 0.5rem;
13
+ transition: all 0.3s ease;
14
+ }
15
+ .dropzone.active {
16
+ border-color: #10b981;
17
+ background-color: rgba(16, 185, 129, 0.1);
18
+ }
19
+ .progress-bar {
20
+ transition: width 0.5s ease;
21
+ }
22
+ .nsfw-badge {
23
+ animation: pulse 2s infinite;
24
+ }
25
+ @keyframes pulse {
26
+ 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
27
+ 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
28
+ 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
29
+ }
30
+ .gpu-meter {
31
+ background: linear-gradient(90deg, #10b981 0%, #10b981 50%, #f59e0b 50%, #f59e0b 100%);
32
+ }
33
+ .result-image {
34
+ transition: transform 0.3s ease;
35
+ }
36
+ .result-image:hover {
37
+ transform: scale(1.03);
38
+ }
39
+ </style>
40
+ </head>
41
+ <body class="bg-gray-900 text-gray-100 min-h-screen">
42
+ <div class="container mx-auto px-4 py-8">
43
+ <!-- Header with warning -->
44
+ <div class="flex flex-col items-center mb-8">
45
+ <div class="flex items-center mb-4">
46
+ <i class="fas fa-exclamation-triangle text-red-500 text-2xl mr-2"></i>
47
+ <h1 class="text-3xl font-bold text-center bg-gradient-to-r from-purple-500 to-pink-500 bg-clip-text text-transparent">
48
+ NSFW Image Generator
49
+ </h1>
50
+ <span class="ml-2 px-2 py-1 bg-red-500 text-white text-xs font-bold rounded-full nsfw-badge">18+</span>
51
+ </div>
52
+ <p class="text-gray-400 text-center max-w-2xl">
53
+ Transform your images with AI. This tool uses community-shared GPU resources for free generation.
54
+ <br>All content is automatically filtered for compliance with our guidelines.
55
+ </p>
56
+ </div>
57
+
58
+ <!-- Age verification -->
59
+ <div id="ageVerification" class="fixed inset-0 bg-gray-900 bg-opacity-90 flex items-center justify-center z-50">
60
+ <div class="bg-gray-800 p-6 rounded-lg max-w-md mx-4">
61
+ <h2 class="text-2xl font-bold mb-4 text-center">Age Verification</h2>
62
+ <p class="text-gray-300 mb-6 text-center">
63
+ This tool generates adult content. You must be at least 18 years old to continue.
64
+ </p>
65
+ <div class="flex flex-col space-y-3">
66
+ <button onclick="verifyAge(true)" class="bg-red-500 hover:bg-red-600 text-white py-2 px-4 rounded font-bold">
67
+ I'm 18 or older - Enter
68
+ </button>
69
+ <button onclick="verifyAge(false)" class="bg-gray-600 hover:bg-gray-700 text-white py-2 px-4 rounded">
70
+ I'm under 18 - Exit
71
+ </button>
72
+ </div>
73
+ </div>
74
+ </div>
75
+
76
+ <!-- Main content (hidden until age verification) -->
77
+ <div id="mainContent" class="hidden">
78
+ <!-- GPU status -->
79
+ <div class="bg-gray-800 rounded-lg p-4 mb-6">
80
+ <div class="flex justify-between items-center mb-2">
81
+ <div class="flex items-center">
82
+ <i class="fas fa-microchip text-purple-500 mr-2"></i>
83
+ <span class="font-medium">Community GPU Resources</span>
84
+ </div>
85
+ <span class="text-xs bg-green-500 text-white px-2 py-1 rounded-full">Free Tier Active</span>
86
+ </div>
87
+ <div class="mt-2">
88
+ <div class="flex justify-between text-xs text-gray-400 mb-1">
89
+ <span>0%</span>
90
+ <span>50%</span>
91
+ <span>100%</span>
92
+ </div>
93
+ <div class="w-full bg-gray-700 rounded-full h-2.5">
94
+ <div id="gpuUsage" class="gpu-meter h-2.5 rounded-full" style="width: 35%"></div>
95
+ </div>
96
+ <div class="flex justify-between text-xs text-gray-400 mt-1">
97
+ <span>Current: 35%</span>
98
+ <span>Queue: 2 requests ahead</span>
99
+ </div>
100
+ </div>
101
+ </div>
102
+
103
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
104
+ <!-- Input section -->
105
+ <div class="bg-gray-800 rounded-lg p-6">
106
+ <h2 class="text-xl font-bold mb-4 flex items-center">
107
+ <i class="fas fa-image text-purple-500 mr-2"></i>
108
+ Input Image
109
+ </h2>
110
+
111
+ <div id="dropzone" class="dropzone p-8 mb-4 flex flex-col items-center justify-center cursor-pointer">
112
+ <i class="fas fa-cloud-upload-alt text-4xl text-purple-500 mb-2"></i>
113
+ <p class="text-center">Drag & drop your image here or click to browse</p>
114
+ <p class="text-xs text-gray-400 mt-2">Supports JPG, PNG (Max 5MB)</p>
115
+ <input type="file" id="fileInput" class="hidden" accept="image/*">
116
+ </div>
117
+
118
+ <div id="previewContainer" class="hidden mb-4">
119
+ <div class="relative">
120
+ <img id="previewImage" src="" alt="Preview" class="w-full h-auto rounded-lg max-h-64 object-contain mx-auto">
121
+ <button id="clearPreview" class="absolute top-2 right-2 bg-red-500 text-white rounded-full p-1 hover:bg-red-600">
122
+ <i class="fas fa-times"></i>
123
+ </button>
124
+ </div>
125
+ </div>
126
+
127
+ <div class="space-y-4">
128
+ <div>
129
+ <label class="block text-sm font-medium mb-1">Style</label>
130
+ <select class="w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-purple-500">
131
+ <option>Anime</option>
132
+ <option>Realistic</option>
133
+ <option>Fantasy</option>
134
+ <option>Cyberpunk</option>
135
+ <option>Watercolor</option>
136
+ </select>
137
+ </div>
138
+
139
+ <div>
140
+ <label class="block text-sm font-medium mb-1">Intensity</label>
141
+ <input type="range" min="1" max="10" value="5" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer">
142
+ <div class="flex justify-between text-xs text-gray-400 mt-1">
143
+ <span>Subtle</span>
144
+ <span>Extreme</span>
145
+ </div>
146
+ </div>
147
+
148
+ <div>
149
+ <label class="block text-sm font-medium mb-1">Additional Prompt</label>
150
+ <textarea class="w-full bg-gray-700 border border-gray-600 rounded-md py-2 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-purple-500" rows="2" placeholder="Describe what you want to change..."></textarea>
151
+ </div>
152
+
153
+ <button id="generateBtn" class="w-full bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-4 rounded-md flex items-center justify-center">
154
+ <i class="fas fa-magic mr-2"></i>
155
+ Generate NSFW Version
156
+ </button>
157
+ </div>
158
+ </div>
159
+
160
+ <!-- Output section -->
161
+ <div class="bg-gray-800 rounded-lg p-6">
162
+ <h2 class="text-xl font-bold mb-4 flex items-center">
163
+ <i class="fas fa-star text-yellow-500 mr-2"></i>
164
+ Generated Results
165
+ </h2>
166
+
167
+ <div id="generationStatus" class="hidden">
168
+ <div class="bg-gray-700 rounded-lg p-4 mb-4">
169
+ <div class="flex items-center mb-2">
170
+ <div class="w-4 h-4 rounded-full bg-purple-500 mr-2 animate-pulse"></div>
171
+ <span class="font-medium">Generating...</span>
172
+ </div>
173
+ <div class="w-full bg-gray-600 rounded-full h-2.5">
174
+ <div id="generationProgress" class="progress-bar bg-purple-500 h-2.5 rounded-full" style="width: 0%"></div>
175
+ </div>
176
+ <div class="text-xs text-gray-400 mt-2 flex justify-between">
177
+ <span>Using community GPU #42</span>
178
+ <span id="progressText">0%</span>
179
+ </div>
180
+ </div>
181
+ </div>
182
+
183
+ <div id="resultsContainer" class="hidden">
184
+ <div class="grid grid-cols-2 gap-4 mb-4">
185
+ <div class="result-image bg-gray-700 rounded-lg overflow-hidden">
186
+ <img src="https://via.placeholder.com/300x400/333/666?text=Generated+1" alt="Result 1" class="w-full h-auto">
187
+ <div class="p-2 flex justify-between">
188
+ <button class="text-purple-400 hover:text-purple-300">
189
+ <i class="fas fa-redo"></i> Remix
190
+ </button>
191
+ <button class="text-green-400 hover:text-green-300">
192
+ <i class="fas fa-download"></i> Download
193
+ </button>
194
+ </div>
195
+ </div>
196
+ <div class="result-image bg-gray-700 rounded-lg overflow-hidden">
197
+ <img src="https://via.placeholder.com/300x400/333/666?text=Generated+2" alt="Result 2" class="w-full h-auto">
198
+ <div class="p-2 flex justify-between">
199
+ <button class="text-purple-400 hover:text-purple-300">
200
+ <i class="fas fa-redo"></i> Remix
201
+ </button>
202
+ <button class="text-green-400 hover:text-green-300">
203
+ <i class="fas fa-download"></i> Download
204
+ </button>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <div class="bg-gray-700 rounded-lg p-3 text-sm">
210
+ <div class="flex items-center mb-2">
211
+ <i class="fas fa-info-circle text-blue-400 mr-2"></i>
212
+ <span class="font-medium">About Free GPU Usage</span>
213
+ </div>
214
+ <p class="text-gray-300 text-xs">
215
+ This tool runs on shared community GPU resources. Generation may take longer during peak times.
216
+ You can help the community by <a href="#" class="text-purple-400 hover:underline">donating GPU time</a>.
217
+ </p>
218
+ </div>
219
+ </div>
220
+
221
+ <div id="emptyState" class="flex flex-col items-center justify-center py-12 text-gray-500">
222
+ <i class="fas fa-images text-4xl mb-4"></i>
223
+ <p class="text-center">Your generated images will appear here</p>
224
+ <p class="text-xs text-center mt-2">No API keys required - powered by community resources</p>
225
+ </div>
226
+ </div>
227
+ </div>
228
+
229
+ <!-- Community section -->
230
+ <div class="mt-8 bg-gray-800 rounded-lg p-6">
231
+ <h2 class="text-xl font-bold mb-4 flex items-center">
232
+ <i class="fas fa-users text-blue-500 mr-2"></i>
233
+ Community GPU Network
234
+ </h2>
235
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
236
+ <div class="bg-gray-700 p-4 rounded-lg">
237
+ <div class="flex items-center mb-2">
238
+ <div class="w-2 h-2 rounded-full bg-green-500 mr-2"></div>
239
+ <span class="font-medium">Active Nodes</span>
240
+ </div>
241
+ <p class="text-3xl font-bold">142</p>
242
+ <p class="text-xs text-gray-400 mt-1">+8 this week</p>
243
+ </div>
244
+ <div class="bg-gray-700 p-4 rounded-lg">
245
+ <div class="flex items-center mb-2">
246
+ <div class="w-2 h-2 rounded-full bg-purple-500 mr-2"></div>
247
+ <span class="font-medium">Free Generations</span>
248
+ </div>
249
+ <p class="text-3xl font-bold">3,842</p>
250
+ <p class="text-xs text-gray-400 mt-1">today</p>
251
+ </div>
252
+ <div class="bg-gray-700 p-4 rounded-lg">
253
+ <div class="flex items-center mb-2">
254
+ <div class="w-2 h-2 rounded-full bg-yellow-500 mr-2"></div>
255
+ <span class="font-medium">Your Credits</span>
256
+ </div>
257
+ <p class="text-3xl font-bold">5</p>
258
+ <p class="text-xs text-gray-400 mt-1">+1 daily (max 10)</p>
259
+ </div>
260
+ </div>
261
+ <div class="mt-4 text-sm text-gray-400">
262
+ <p>This platform is powered by volunteers who share their GPU resources. Each free generation uses 1 credit.</p>
263
+ </div>
264
+ </div>
265
+ </div>
266
+ </div>
267
+
268
+ <script>
269
+ // Age verification
270
+ function verifyAge(isAdult) {
271
+ const ageVerification = document.getElementById('ageVerification');
272
+ const mainContent = document.getElementById('mainContent');
273
+
274
+ if (isAdult) {
275
+ ageVerification.style.display = 'none';
276
+ mainContent.style.display = 'block';
277
+ document.body.style.overflow = 'auto';
278
+
279
+ // Store verification in session
280
+ sessionStorage.setItem('ageVerified', 'true');
281
+ } else {
282
+ window.location.href = 'https://www.google.com';
283
+ }
284
+ }
285
+
286
+ // Check if already verified
287
+ if (sessionStorage.getItem('ageVerified')) {
288
+ document.getElementById('ageVerification').style.display = 'none';
289
+ document.getElementById('mainContent').style.display = 'block';
290
+ } else {
291
+ document.body.style.overflow = 'hidden';
292
+ }
293
+
294
+ // File upload handling
295
+ const dropzone = document.getElementById('dropzone');
296
+ const fileInput = document.getElementById('fileInput');
297
+ const previewContainer = document.getElementById('previewContainer');
298
+ const previewImage = document.getElementById('previewImage');
299
+ const clearPreview = document.getElementById('clearPreview');
300
+ const generateBtn = document.getElementById('generateBtn');
301
+ const generationStatus = document.getElementById('generationStatus');
302
+ const generationProgress = document.getElementById('generationProgress');
303
+ const progressText = document.getElementById('progressText');
304
+ const resultsContainer = document.getElementById('resultsContainer');
305
+ const emptyState = document.getElementById('emptyState');
306
+ const gpuUsage = document.getElementById('gpuUsage');
307
+
308
+ // Drag and drop events
309
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
310
+ dropzone.addEventListener(eventName, preventDefaults, false);
311
+ });
312
+
313
+ function preventDefaults(e) {
314
+ e.preventDefault();
315
+ e.stopPropagation();
316
+ }
317
+
318
+ ['dragenter', 'dragover'].forEach(eventName => {
319
+ dropzone.addEventListener(eventName, highlight, false);
320
+ });
321
+
322
+ ['dragleave', 'drop'].forEach(eventName => {
323
+ dropzone.addEventListener(eventName, unhighlight, false);
324
+ });
325
+
326
+ function highlight() {
327
+ dropzone.classList.add('active');
328
+ }
329
+
330
+ function unhighlight() {
331
+ dropzone.classList.remove('active');
332
+ }
333
+
334
+ dropzone.addEventListener('drop', handleDrop, false);
335
+ dropzone.addEventListener('click', () => fileInput.click());
336
+
337
+ function handleDrop(e) {
338
+ const dt = e.dataTransfer;
339
+ const files = dt.files;
340
+ handleFiles(files);
341
+ }
342
+
343
+ fileInput.addEventListener('change', function() {
344
+ handleFiles(this.files);
345
+ });
346
+
347
+ function handleFiles(files) {
348
+ if (files.length > 0) {
349
+ const file = files[0];
350
+ if (file.type.match('image.*')) {
351
+ const reader = new FileReader();
352
+
353
+ reader.onload = function(e) {
354
+ previewImage.src = e.target.result;
355
+ previewContainer.classList.remove('hidden');
356
+ generateBtn.disabled = false;
357
+ }
358
+
359
+ reader.readAsDataURL(file);
360
+ } else {
361
+ alert('Please upload an image file (JPG, PNG)');
362
+ }
363
+ }
364
+ }
365
+
366
+ clearPreview.addEventListener('click', function() {
367
+ previewImage.src = '';
368
+ previewContainer.classList.add('hidden');
369
+ fileInput.value = '';
370
+ generateBtn.disabled = true;
371
+ });
372
+
373
+ // Generate button click
374
+ generateBtn.addEventListener('click', function() {
375
+ if (!previewImage.src || previewImage.src === '') {
376
+ alert('Please upload an image first');
377
+ return;
378
+ }
379
+
380
+ // Show generation status
381
+ generationStatus.classList.remove('hidden');
382
+ emptyState.classList.add('hidden');
383
+
384
+ // Simulate generation progress
385
+ let progress = 0;
386
+ const interval = setInterval(() => {
387
+ progress += Math.random() * 10;
388
+ if (progress > 100) progress = 100;
389
+
390
+ generationProgress.style.width = `${progress}%`;
391
+ progressText.textContent = `${Math.round(progress)}%`;
392
+
393
+ // Random GPU usage fluctuation
394
+ const newGpuUsage = 35 + Math.sin(Date.now() / 1000) * 15;
395
+ gpuUsage.style.width = `${newGpuUsage}%`;
396
+
397
+ if (progress === 100) {
398
+ clearInterval(interval);
399
+ setTimeout(() => {
400
+ generationStatus.classList.add('hidden');
401
+ resultsContainer.classList.remove('hidden');
402
+ }, 500);
403
+ }
404
+ }, 300);
405
+ });
406
+
407
+ // Simulate GPU usage fluctuations
408
+ setInterval(() => {
409
+ const fluctuation = Math.sin(Date.now() / 5000) * 10;
410
+ const currentUsage = parseFloat(gpuUsage.style.width);
411
+ const newUsage = Math.max(5, Math.min(95, currentUsage + fluctuation));
412
+ gpuUsage.style.width = `${newUsage}%`;
413
+ }, 2000);
414
+ </script>
415
+ <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=SungSolo/img2imgnsfw" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
416
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ develop NSFW Image to image Generator with free GPU usage space with no API key access requirement