iammrrobot420 commited on
Commit
20279c7
·
verified ·
1 Parent(s): 60aeeed

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +446 -19
index.html CHANGED
@@ -1,19 +1,446 @@
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>Personal Image Editor</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary: #6c5ce7;
11
+ --secondary: #a29bfe;
12
+ --dark: #2d3436;
13
+ --light: #f5f6fa;
14
+ --warning: #e17055;
15
+ --success: #00b894;
16
+ }
17
+
18
+ * {
19
+ margin: 0;
20
+ padding: 0;
21
+ box-sizing: border-box;
22
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
23
+ }
24
+
25
+ body {
26
+ background-color: var(--light);
27
+ color: var(--dark);
28
+ min-height: 100vh;
29
+ padding: 2rem;
30
+ }
31
+
32
+ .header {
33
+ display: flex;
34
+ justify-content: space-between;
35
+ align-items: center;
36
+ margin-bottom: 2rem;
37
+ padding-bottom: 1rem;
38
+ border-bottom: 1px solid var(--secondary);
39
+ }
40
+
41
+ .header h1 {
42
+ color: var(--primary);
43
+ font-size: 1.8rem;
44
+ }
45
+
46
+ .header a {
47
+ color: var(--primary);
48
+ text-decoration: none;
49
+ font-size: 0.9rem;
50
+ }
51
+
52
+ .container {
53
+ max-width: 1200px;
54
+ margin: 0 auto;
55
+ }
56
+
57
+ .upload-section {
58
+ background-color: white;
59
+ border-radius: 10px;
60
+ padding: 2rem;
61
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
62
+ margin-bottom: 2rem;
63
+ }
64
+
65
+ .upload-area {
66
+ border: 2px dashed var(--secondary);
67
+ border-radius: 8px;
68
+ padding: 3rem 1rem;
69
+ text-align: center;
70
+ cursor: pointer;
71
+ transition: all 0.3s ease;
72
+ margin-bottom: 1.5rem;
73
+ }
74
+
75
+ .upload-area:hover {
76
+ border-color: var(--primary);
77
+ background-color: rgba(108, 92, 231, 0.05);
78
+ }
79
+
80
+ .upload-area i {
81
+ font-size: 2.5rem;
82
+ color: var(--primary);
83
+ margin-bottom: 1rem;
84
+ }
85
+
86
+ .upload-area p {
87
+ color: var(--dark);
88
+ margin-bottom: 0.5rem;
89
+ }
90
+
91
+ .upload-area small {
92
+ color: #7f8c8d;
93
+ }
94
+
95
+ #fileInput {
96
+ display: none;
97
+ }
98
+
99
+ .options-section {
100
+ background-color: white;
101
+ border-radius: 10px;
102
+ padding: 2rem;
103
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
104
+ margin-bottom: 2rem;
105
+ }
106
+
107
+ .options-section h2 {
108
+ color: var(--primary);
109
+ margin-bottom: 1.5rem;
110
+ font-size: 1.3rem;
111
+ }
112
+
113
+ .option-group {
114
+ margin-bottom: 1.5rem;
115
+ }
116
+
117
+ .option-group label {
118
+ display: block;
119
+ margin-bottom: 0.5rem;
120
+ font-weight: 500;
121
+ }
122
+
123
+ .slider-container {
124
+ display: flex;
125
+ align-items: center;
126
+ gap: 1rem;
127
+ }
128
+
129
+ .slider {
130
+ flex: 1;
131
+ -webkit-appearance: none;
132
+ height: 8px;
133
+ border-radius: 4px;
134
+ background: var(--secondary);
135
+ outline: none;
136
+ }
137
+
138
+ .slider::-webkit-slider-thumb {
139
+ -webkit-appearance: none;
140
+ appearance: none;
141
+ width: 20px;
142
+ height: 20px;
143
+ border-radius: 50%;
144
+ background: var(--primary);
145
+ cursor: pointer;
146
+ }
147
+
148
+ .slider-value {
149
+ min-width: 30px;
150
+ text-align: center;
151
+ font-weight: bold;
152
+ color: var(--primary);
153
+ }
154
+
155
+ .btn {
156
+ background-color: var(--primary);
157
+ color: white;
158
+ border: none;
159
+ padding: 0.8rem 1.5rem;
160
+ border-radius: 5px;
161
+ cursor: pointer;
162
+ font-weight: 600;
163
+ transition: all 0.3s ease;
164
+ display: inline-flex;
165
+ align-items: center;
166
+ gap: 0.5rem;
167
+ }
168
+
169
+ .btn:hover {
170
+ background-color: #5649c5;
171
+ transform: translateY(-2px);
172
+ }
173
+
174
+ .btn i {
175
+ font-size: 1rem;
176
+ }
177
+
178
+ .btn-secondary {
179
+ background-color: var(--secondary);
180
+ }
181
+
182
+ .btn-secondary:hover {
183
+ background-color: #8c7ae6;
184
+ }
185
+
186
+ .preview-section {
187
+ background-color: white;
188
+ border-radius: 10px;
189
+ padding: 2rem;
190
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
191
+ }
192
+
193
+ .preview-section h2 {
194
+ color: var(--primary);
195
+ margin-bottom: 1.5rem;
196
+ font-size: 1.3rem;
197
+ }
198
+
199
+ .image-container {
200
+ display: flex;
201
+ flex-wrap: wrap;
202
+ gap: 1rem;
203
+ margin-bottom: 1.5rem;
204
+ }
205
+
206
+ .image-box {
207
+ flex: 1;
208
+ min-width: 300px;
209
+ border: 1px solid #dfe6e9;
210
+ border-radius: 8px;
211
+ overflow: hidden;
212
+ position: relative;
213
+ }
214
+
215
+ .image-box img {
216
+ width: 100%;
217
+ height: auto;
218
+ display: block;
219
+ }
220
+
221
+ .image-label {
222
+ position: absolute;
223
+ bottom: 0;
224
+ left: 0;
225
+ right: 0;
226
+ background-color: rgba(0,0,0,0.7);
227
+ color: white;
228
+ padding: 0.5rem;
229
+ text-align: center;
230
+ font-size: 0.9rem;
231
+ }
232
+
233
+ .action-buttons {
234
+ display: flex;
235
+ gap: 1rem;
236
+ flex-wrap: wrap;
237
+ }
238
+
239
+ .disclaimer {
240
+ font-size: 0.8rem;
241
+ color: #7f8c8d;
242
+ margin-top: 2rem;
243
+ padding: 1rem;
244
+ background-color: #f1f2f6;
245
+ border-radius: 5px;
246
+ }
247
+
248
+ @media (max-width: 768px) {
249
+ .image-container {
250
+ flex-direction: column;
251
+ }
252
+
253
+ .action-buttons {
254
+ flex-direction: column;
255
+ }
256
+
257
+ .btn {
258
+ width: 100%;
259
+ justify-content: center;
260
+ }
261
+ }
262
+ </style>
263
+ </head>
264
+ <body>
265
+ <div class="container">
266
+ <div class="header">
267
+ <h1>Personal Image Editor</h1>
268
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
269
+ </div>
270
+
271
+ <div class="upload-section">
272
+ <h2>Upload Your Image</h2>
273
+ <div class="upload-area" id="uploadArea">
274
+ <i class="fas fa-cloud-upload-alt"></i>
275
+ <p>Drag & Drop your image here</p>
276
+ <small>or click to browse files</small>
277
+ <input type="file" id="fileInput" accept="image/*">
278
+ </div>
279
+ <div class="action-buttons">
280
+ <button class="btn" id="processBtn" disabled>
281
+ <i class="fas fa-magic"></i> Process Image
282
+ </button>
283
+ <button class="btn btn-secondary" id="downloadBtn" disabled>
284
+ <i class="fas fa-download"></i> Download Result
285
+ </button>
286
+ </div>
287
+ </div>
288
+
289
+ <div class="options-section">
290
+ <h2>Modification Options</h2>
291
+
292
+ <div class="option-group">
293
+ <label for="penisSize">Penis Size</label>
294
+ <div class="slider-container">
295
+ <input type="range" min="1" max="10" value="5" class="slider" id="penisSize">
296
+ <span class="slider-value" id="penisSizeValue">5</span>
297
+ </div>
298
+ <small>Adjust the size of the modification</small>
299
+ </div>
300
+
301
+ <div class="option-group">
302
+ <label for="realism">Realism Level</label>
303
+ <div class="slider-container">
304
+ <input type="range" min="1" max="10" value="7" class="slider" id="realism">
305
+ <span class="slider-value" id="realismValue">7</span>
306
+ </div>
307
+ <small>Adjust how realistic the modification appears</small>
308
+ </div>
309
+
310
+ <div class="option-group">
311
+ <label for="position">Position</label>
312
+ <div class="slider-container">
313
+ <input type="range" min="1" max="10" value="5" class="slider" id="position">
314
+ <span class="slider-value" id="positionValue">5</span>
315
+ </div>
316
+ <small>Adjust the position of the modification</small>
317
+ </div>
318
+ </div>
319
+
320
+ <div class="preview-section">
321
+ <h2>Preview</h2>
322
+ <div class="image-container">
323
+ <div class="image-box">
324
+ <img id="originalImage" src="" alt="Original Image" style="display: none;">
325
+ <div class="image-label">Original</div>
326
+ </div>
327
+ <div class="image-box">
328
+ <img id="modifiedImage" src="" alt="Modified Image" style="display: none;">
329
+ <div class="image-label">Modified</div>
330
+ </div>
331
+ </div>
332
+ </div>
333
+
334
+ <div class="disclaimer">
335
+ <p><strong>Note:</strong> This is a personal application for your own use. All processing happens locally in your browser. No images are uploaded to any server.</p>
336
+ </div>
337
+ </div>
338
+
339
+ <script>
340
+ // DOM Elements
341
+ const uploadArea = document.getElementById('uploadArea');
342
+ const fileInput = document.getElementById('fileInput');
343
+ const processBtn = document.getElementById('processBtn');
344
+ const downloadBtn = document.getElementById('downloadBtn');
345
+ const originalImage = document.getElementById('originalImage');
346
+ const modifiedImage = document.getElementById('modifiedImage');
347
+
348
+ // Sliders
349
+ const penisSizeSlider = document.getElementById('penisSize');
350
+ const penisSizeValue = document.getElementById('penisSizeValue');
351
+ const realismSlider = document.getElementById('realism');
352
+ const realismValue = document.getElementById('realismValue');
353
+ const positionSlider = document.getElementById('position');
354
+ const positionValue = document.getElementById('positionValue');
355
+
356
+ // Event listeners for sliders
357
+ penisSizeSlider.addEventListener('input', () => {
358
+ penisSizeValue.textContent = penisSizeSlider.value;
359
+ });
360
+
361
+ realismSlider.addEventListener('input', () => {
362
+ realismValue.textContent = realismSlider.value;
363
+ });
364
+
365
+ positionSlider.addEventListener('input', () => {
366
+ positionValue.textContent = positionSlider.value;
367
+ });
368
+
369
+ // Upload area click event
370
+ uploadArea.addEventListener('click', () => {
371
+ fileInput.click();
372
+ });
373
+
374
+ // File input change event
375
+ fileInput.addEventListener('change', (e) => {
376
+ if (e.target.files && e.target.files[0]) {
377
+ const reader = new FileReader();
378
+
379
+ reader.onload = (event) => {
380
+ originalImage.src = event.target.result;
381
+ originalImage.style.display = 'block';
382
+ processBtn.disabled = false;
383
+ };
384
+
385
+ reader.readAsDataURL(e.target.files[0]);
386
+ }
387
+ });
388
+
389
+ // Drag and drop functionality
390
+ uploadArea.addEventListener('dragover', (e) => {
391
+ e.preventDefault();
392
+ uploadArea.style.borderColor = 'var(--primary)';
393
+ uploadArea.style.backgroundColor = 'rgba(108, 92, 231, 0.05)';
394
+ });
395
+
396
+ uploadArea.addEventListener('dragleave', () => {
397
+ uploadArea.style.borderColor = 'var(--secondary)';
398
+ uploadArea.style.backgroundColor = 'transparent';
399
+ });
400
+
401
+ uploadArea.addEventListener('drop', (e) => {
402
+ e.preventDefault();
403
+ uploadArea.style.borderColor = 'var(--secondary)';
404
+ uploadArea.style.backgroundColor = 'transparent';
405
+
406
+ if (e.dataTransfer.files && e.dataTransfer.files[0]) {
407
+ fileInput.files = e.dataTransfer.files;
408
+ const event = new Event('change');
409
+ fileInput.dispatchEvent(event);
410
+ }
411
+ });
412
+
413
+ // Process button click event
414
+ processBtn.addEventListener('click', () => {
415
+ if (!originalImage.src) return;
416
+
417
+ processBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Processing...';
418
+ processBtn.disabled = true;
419
+
420
+ // Simulate processing (in a real app, this would call an API or use a library)
421
+ setTimeout(() => {
422
+ modifiedImage.src = originalImage.src; // In reality, this would be the modified image
423
+ modifiedImage.style.display = 'block';
424
+ downloadBtn.disabled = false;
425
+ processBtn.innerHTML = '<i class="fas fa-magic"></i> Process Image';
426
+ processBtn.disabled = false;
427
+
428
+ // Show a success message
429
+ alert('Image processing complete!');
430
+ }, 2000);
431
+ });
432
+
433
+ // Download button click event
434
+ downloadBtn.addEventListener('click', () => {
435
+ if (!modifiedImage.src) return;
436
+
437
+ const link = document.createElement('a');
438
+ link.href = modifiedImage.src;
439
+ link.download = 'modified-image.png';
440
+ document.body.appendChild(link);
441
+ link.click();
442
+ document.body.removeChild(link);
443
+ });
444
+ </script>
445
+ </body>
446
+ </html>