mrrobot420 commited on
Commit
6a59d88
·
verified ·
1 Parent(s): aede8e5

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +245 -19
index.html CHANGED
@@ -1,19 +1,245 @@
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>Imaginix Fusion - NSFW Image Combiner</title>
7
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
8
+ <style>
9
+ :root {
10
+ --primary: #ff4757;
11
+ --secondary: #2ed573;
12
+ --dark: #2f3542;
13
+ --light: #f1f2f6;
14
+ }
15
+
16
+ * {
17
+ margin: 0;
18
+ padding: 0;
19
+ box-sizing: border-box;
20
+ font-family: 'Segoe UI', sans-serif;
21
+ }
22
+
23
+ body {
24
+ background: linear-gradient(135deg, #2f3542 0%, #1e272e 100%);
25
+ min-height: 100vh;
26
+ color: var(--light);
27
+ }
28
+
29
+ .container {
30
+ max-width: 1200px;
31
+ margin: 0 auto;
32
+ padding: 2rem;
33
+ }
34
+
35
+ .header {
36
+ text-align: center;
37
+ margin-bottom: 3rem;
38
+ display: flex;
39
+ justify-content: space-between;
40
+ align-items: center;
41
+ }
42
+
43
+ .logo {
44
+ font-size: 2.5rem;
45
+ font-weight: 700;
46
+ background: linear-gradient(45deg, var(--primary), var(--secondary));
47
+ -webkit-background-clip: text;
48
+ -webkit-text-fill-color: transparent;
49
+ }
50
+
51
+ .main-grid {
52
+ display: grid;
53
+ grid-template-columns: 1fr 1fr;
54
+ gap: 2rem;
55
+ margin-bottom: 2rem;
56
+ }
57
+
58
+ .upload-area {
59
+ border: 3px dashed var(--primary);
60
+ border-radius: 15px;
61
+ padding: 2rem;
62
+ text-align: center;
63
+ cursor: pointer;
64
+ transition: all 0.3s ease;
65
+ background: rgba(255, 71, 87, 0.1);
66
+ }
67
+
68
+ .upload-area:hover {
69
+ transform: translateY(-5px);
70
+ border-color: var(--secondary);
71
+ }
72
+
73
+ .preview-image {
74
+ width: 100%;
75
+ max-height: 400px;
76
+ object-fit: cover;
77
+ border-radius: 10px;
78
+ display: none;
79
+ }
80
+
81
+ #prompt-input {
82
+ width: 100%;
83
+ padding: 1rem;
84
+ margin: 2rem 0;
85
+ background: rgba(255,255,255,0.1);
86
+ border: 2px solid var(--secondary);
87
+ border-radius: 8px;
88
+ color: white;
89
+ font-size: 1.1rem;
90
+ }
91
+
92
+ #generate-btn {
93
+ background: linear-gradient(45deg, var(--primary), var(--secondary));
94
+ border: none;
95
+ padding: 1rem 3rem;
96
+ color: white;
97
+ font-size: 1.2rem;
98
+ border-radius: 50px;
99
+ cursor: pointer;
100
+ transition: transform 0.3s ease;
101
+ display: block;
102
+ margin: 0 auto;
103
+ }
104
+
105
+ #generate-btn:hover {
106
+ transform: scale(1.05);
107
+ }
108
+
109
+ .result-container {
110
+ margin-top: 3rem;
111
+ text-align: center;
112
+ }
113
+
114
+ #combined-result {
115
+ width: 100%;
116
+ max-width: 800px;
117
+ border-radius: 15px;
118
+ box-shadow: 0 10px 30px rgba(0,0,0,0.3);
119
+ display: none;
120
+ }
121
+
122
+ .loading {
123
+ display: none;
124
+ margin: 2rem 0;
125
+ font-size: 1.2rem;
126
+ }
127
+
128
+ .warning {
129
+ color: var(--primary);
130
+ margin: 1rem 0;
131
+ font-weight: 500;
132
+ }
133
+
134
+ @media (max-width: 768px) {
135
+ .main-grid {
136
+ grid-template-columns: 1fr;
137
+ }
138
+
139
+ .container {
140
+ padding: 1rem;
141
+ }
142
+ }
143
+ </style>
144
+ </head>
145
+ <body>
146
+ <div class="container">
147
+ <div class="header">
148
+ <div class="logo">ImaginixFusion</div>
149
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" style="color: var(--secondary); text-decoration: none;">Built with anycoder</a>
150
+ </div>
151
+
152
+ <div class="warning">⚠️ Warning: This tool is intended for creative NSFW content generation. Use responsibly.</div>
153
+
154
+ <input type="text" id="prompt-input" placeholder="Enter your fusion prompt (e.g. 'cyberpunk neon aesthetic')...">
155
+
156
+ <div class="main-grid">
157
+ <div class="upload-area" onclick="document.getElementById('file1').click()">
158
+ <i class="fas fa-cloud-upload-alt fa-3x"></i>
159
+ <p>Upload First Image</p>
160
+ <input type="file" id="file1" hidden accept="image/*">
161
+ <img class="preview-image" id="preview1">
162
+ </div>
163
+
164
+ <div class="upload-area" onclick="document.getElementById('file2').click()">
165
+ <i class="fas fa-cloud-upload-alt fa-3x"></i>
166
+ <p>Upload Second Image</p>
167
+ <input type="file" id="file2" hidden accept="image/*">
168
+ <img class="preview-image" id="preview2">
169
+ </div>
170
+ </div>
171
+
172
+ <button id="generate-btn" onclick="processImages()">Generate Fusion</button>
173
+ <div class="loading" id="loading">🌀 Synthesizing creative fusion...</div>
174
+
175
+ <div class="result-container">
176
+ <img id="combined-result">
177
+ </div>
178
+ </div>
179
+
180
+ <script>
181
+ function handleImageUpload(input, previewId) {
182
+ const file = input.files[0];
183
+ if (file) {
184
+ const reader = new FileReader();
185
+ reader.onload = function(e) {
186
+ const preview = document.getElementById(previewId);
187
+ preview.src = e.target.result;
188
+ preview.style.display = 'block';
189
+ input.parentNode.querySelector('i, p').style.display = 'none';
190
+ }
191
+ reader.readAsDataURL(file);
192
+ }
193
+ }
194
+
195
+ document.getElementById('file1').addEventListener('change', function() {
196
+ handleImageUpload(this, 'preview1');
197
+ });
198
+
199
+ document.getElementById('file2').addEventListener('change', function() {
200
+ handleImageUpload(this, 'preview2');
201
+ });
202
+
203
+ function processImages() {
204
+ const loading = document.getElementById('loading');
205
+ const result = document.getElementById('combined-result');
206
+ const prompt = document.getElementById('prompt-input').value;
207
+
208
+ if (!prompt) {
209
+ alert('Please enter a fusion prompt!');
210
+ return;
211
+ }
212
+
213
+ loading.style.display = 'block';
214
+
215
+ // Simulated processing delay
216
+ setTimeout(() => {
217
+ // In a real implementation, this would send the images and prompt to an API
218
+ // For demonstration, we'll create a canvas combination
219
+ const canvas = document.createElement('canvas');
220
+ const ctx = canvas.getContext('2d');
221
+
222
+ // Combine preview images
223
+ const img1 = document.getElementById('preview1');
224
+ const img2 = document.getElementById('preview2');
225
+
226
+ if (!img1.src || !img2.src) {
227
+ alert('Please upload both images!');
228
+ loading.style.display = 'none';
229
+ return;
230
+ }
231
+
232
+ canvas.width = Math.max(img1.width, img2.width);
233
+ canvas.height = img1.height + img2.height;
234
+
235
+ ctx.drawImage(img1, 0, 0);
236
+ ctx.drawImage(img2, 0, img1.height);
237
+
238
+ result.src = canvas.toDataURL();
239
+ result.style.display = 'block';
240
+ loading.style.display = 'none';
241
+ }, 2000);
242
+ }
243
+ </script>
244
+ </body>
245
+ </html>