hadadrjt commited on
Commit
bc4b939
·
1 Parent(s): 4f33245

image: Refac B/F.

Browse files
public/webViewer.ejs CHANGED
@@ -5,323 +5,10 @@
5
 
6
  <!DOCTYPE html>
7
  <html lang="en">
8
- <head>
9
- <meta charset="UTF-8">
10
- <meta name="viewport"
11
- content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
12
-
13
- <meta name="author" content="Hadad Darajat" />
14
-
15
- <meta name="description"
16
- content="UltimaX Intelligence is a free AI platform unifying
17
- multiple premium AI models with an intuitive
18
- ChatGPT-like interface. Powered by Pollinations
19
- open-source AI and integrated with OpenWebUI,
20
- it offers advanced features, no cost, no registration,
21
- and ensures user privacy with temporary,
22
- unsaved conversations." />
23
-
24
- <meta name="keywords"
25
- content="UltimaX Intelligence, free AI platform,
26
- premium AI models, Pollinations AI, open-source AI,
27
- Open-WebUI integration, ChatGPT alternative,
28
- AI tools free, no registration AI, AI privacy,
29
- temporary AI conversations, AI platform no login,
30
- advanced AI features, AI community powered,
31
- seamless AI experience" />
32
-
33
- <meta property="og:domain" content="umint-ai.hf.space" />
34
- <meta property="og:url" content="https://umint-ai.hf.space" />
35
- <meta property="og:title" content="UltimaX Intelligence" />
36
-
37
- <meta property="og:description"
38
- content="UltimaX Intelligence is a free AI platform unifying
39
- multiple premium AI models with an intuitive
40
- ChatGPT-like interface. Powered by Pollinations
41
- open-source AI and integrated with OpenWebUI,
42
- it offers advanced features, no cost, no registration,
43
- and ensures user privacy with temporary,
44
- unsaved conversations." />
45
-
46
- <meta property="og:image"
47
- content="https://cdn-uploads.huggingface.co/production/uploads/686e28b405d4ddcdd96adeb2/i9iufR3L-rgj39mk_B9QW.jpeg" />
48
-
49
- <meta name="twitter:card" content="summary_large_image" />
50
- <meta name="twitter:domain" content="umint-ai.hf.space" />
51
- <meta name="twitter:url" content="https://umint-ai.hf.space" />
52
- <meta name="twitter:title" content="UltimaX Intelligence" />
53
-
54
- <meta name="twitter:description"
55
- content="UltimaX Intelligence is a free AI platform unifying
56
- multiple premium AI models with an intuitive
57
- ChatGPT-like interface. Powered by Pollinations
58
- open-source AI and integrated with OpenWebUI,
59
- it offers advanced features, no cost, no registration,
60
- and ensures user privacy with temporary,
61
- unsaved conversations." />
62
-
63
- <meta name="twitter:image"
64
- content="https://cdn-uploads.huggingface.co/production/uploads/686e28b405d4ddcdd96adeb2/i9iufR3L-rgj39mk_B9QW.jpeg" />
65
-
66
- <link rel="icon"
67
- href="https://umint-ai.hf.space/assets/images/favicon.ico"
68
- type="image/x-icon" />
69
-
70
- <title>Image Generation Playground</title>
71
-
72
- <script src="https://cdn.tailwindcss.com"></script>
73
-
74
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap"
75
- rel="stylesheet">
76
-
77
- <link rel="stylesheet"
78
- href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.css"
79
- integrity="sha512-phGxLIsvHFArdI7IyLjv14dchvbVkEDaH95efvAae/y2exeWBQCQDpNFbOTdV1p4/pIa/XtbuDCnfhDEIXhvGQ=="
80
- crossorigin="anonymous"
81
- referrerpolicy="no-referrer" />
82
-
83
- <link rel="stylesheet" href="/__public__/assets/css/styles.css" />
84
- <link rel="stylesheet" href="/__public__/assets/css/webLoader.css" />
85
-
86
- <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.7/dist/purify.js"></script>
87
- <script src="https://cdnjs.cloudflare.com/ajax/libs/validator/13.15.15/validator.js"></script>
88
- <script src="https://cdnjs.cloudflare.com/ajax/libs/he/1.2.0/he.js"></script>
89
- <script src="https://cdn.jsdelivr.net/npm/xss@1.0.15/dist/xss.js"></script>
90
-
91
- <script src="/__public__/data/models.js"></script>
92
- <script src="/__public__/data/resolution.js"></script>
93
- <script src="/__public__/data/examples.js"></script>
94
- </head>
95
  <body data-is-generating="<%= !!isGenerating %>"
96
  data-session-id="<%= sessionId || '' %>">
97
- <div class="gradient-bg"></div>
98
- <div class="gradient-mesh"></div>
99
-
100
- <div id="welcomeModal" class="modal-overlay" style="display: none;">
101
- <div class="modal-content">
102
- <div class="modal-inner">
103
- <h2 class="header-gradient animate__animated
104
- animate__fadeInDown modal-title">
105
- Hi there!
106
- </h2>
107
- <div class="animate__animated animate__fadeInUp modal-text">
108
- Welcome to the <b>Image Generation Playground</b>,
109
- where imagination transforms into visual creations.
110
- <br><br>
111
- For your information, <b>image generation</b> and
112
- <b>OpenAI Audio TTS</b> is already built-in natively
113
- in the primary spaces.
114
- <br><br>
115
- For more advanced capabilities, please visit the
116
- <b><a href='https://umint-openwebui.hf.space'
117
- target='_blank' style="color: var(--accent);
118
- text-decoration: underline;">
119
- UltimaX Intelligence</a></b> primary spaces.
120
- <br><br>
121
- Please consider reading the
122
- <b><a href='https://huggingface.co/spaces/umint/ai/discussions/37'
123
- target='_blank' style="color: var(--accent);
124
- text-decoration: underline;">
125
- Terms of Use and Consequences of Violation</a></b>
126
- if you wish to proceed to the main Spaces.
127
- <br><br>
128
- <b>Like this project? Feel free to buy me a
129
- <a href='https://ko-fi.com/hadad' target='_blank'
130
- style="color: var(--accent);
131
- text-decoration: underline;">coffee</a></b>.
132
- </div>
133
- <button onclick="closeWelcomeModal()"
134
- class="btn btn-primary w-full animate__animated
135
- animate__fadeInUp animate__delay-1s">
136
- Get Started
137
- </button>
138
- </div>
139
- </div>
140
- </div>
141
-
142
- <% if (error) { %>
143
- <div id="errorModal" class="modal-overlay">
144
- <div class="modal-content modal-error-content">
145
- <div class="modal-inner">
146
- <h3 class="modal-error-title">Error</h3>
147
- <p class="modal-error-text"><%= error %></p>
148
- <button onclick="closeErrorModal()"
149
- class="btn btn-primary w-full">OK</button>
150
- </div>
151
- </div>
152
- </div>
153
- <% } %>
154
-
155
- <header class="header-main">
156
- <div class="container mx-auto px-4">
157
- <h1 class="header-gradient animate__animated
158
- animate__fadeInDown header-title">
159
- Image Generation Playground
160
- </h1>
161
- </div>
162
- </header>
163
-
164
- <main class="container mx-auto px-4 main-content">
165
-
166
- <div class="image-output-section
167
- <%= images && images.length > 0 ? 'has-images' : '' %>
168
- animate__animated animate__fadeIn">
169
- <% if (isGenerating) { %>
170
- <div class="loading-container">
171
- <div class="loading-spinner"
172
- style="margin: 0 auto 20px;"></div>
173
- <p class="loading-text">Generating your image...</p>
174
- <div class="progress-bar">
175
- <div class="progress-fill"
176
- style="width: <%= progress %>%;"></div>
177
- </div>
178
- <p class="progress-text">
179
- <%= progress.toFixed(0) %>% Complete
180
- </p>
181
- </div>
182
- <% } else if (images && images.length > 0) { %>
183
- <div class="image-grid">
184
- <% images.forEach((image, index) => { %>
185
- <div class="image-card">
186
- <img src="data:image/png;base64,<%= image.base64 %>"
187
- alt="<%= image.prompt %>">
188
- <div class="image-actions">
189
- <a href="data:image/png;base64,<%= image.base64 %>"
190
- download="generated-<%= image.id %>.png"
191
- class="action-btn">
192
- <svg class="action-icon" viewBox="0 0 24 24"
193
- fill="none">
194
- <path d="M12 16L7 11L8.4 9.55L11 12.15V4H13V12.15L15.6 9.55L17 11L12 16Z"
195
- fill="currentColor"/>
196
- <path d="M4 20C3.45 20 2.98 19.8 2.59 19.41C2.2 19.02 2 18.55 2 18V15H4V18H20V15H22V18C22 18.55 21.8 19.02 21.41 19.41C21.02 19.8 20.55 20 20 20H4Z"
197
- fill="currentColor"/>
198
- </svg>
199
- </a>
200
- <button type="button"
201
- onclick="deleteImage(<%= index %>)"
202
- class="action-btn">
203
- <svg class="action-icon" viewBox="0 0 24 24"
204
- fill="none">
205
- <path d="M18.3 5.71C17.91 5.32 17.28 5.32 16.89 5.71L12 10.59L7.11 5.7C6.72 5.31 6.09 5.31 5.7 5.7C5.31 6.09 5.31 6.72 5.7 7.11L10.59 12L5.7 16.89C5.31 17.28 5.31 17.91 5.7 18.3C6.09 18.69 6.72 18.69 7.11 18.3L12 13.41L16.89 18.3C17.28 18.69 17.91 18.69 18.3 18.3C18.69 17.91 18.69 17.28 18.3 16.89L13.41 12L18.3 7.11C18.68 6.73 18.68 6.09 18.3 5.71Z"
206
- fill="currentColor"/>
207
- </svg>
208
- </button>
209
- </div>
210
- <div class="image-info">
211
- <p class="image-prompt"><%= image.prompt %></p>
212
- <p class="image-meta">
213
- <span class="image-model">
214
- <%= image.model.toUpperCase() %>
215
- </span>
216
- | <%= image.size %>
217
- </p>
218
- </div>
219
- </div>
220
- <% }); %>
221
- </div>
222
- <% } else { %>
223
- <svg class="placeholder-icon" width="80" height="80"
224
- viewBox="0 0 24 24" fill="none">
225
- <path d="M21 3H3C2 3 1 4 1 5V19C1 20 2 21 3 21H21C22 21 23 20 23 19V5C23 4 22 3 21 3ZM21 19H3V5H21V19Z"
226
- fill="currentColor"/>
227
- <path d="M4.5 16.5L9 12L11.5 14.5L16 10L19.5 13.5"
228
- stroke="currentColor" stroke-width="1.5"
229
- stroke-linecap="round"/>
230
- <circle cx="8" cy="8.5" r="1.5" fill="currentColor"/>
231
- </svg>
232
- <p class="placeholder-text">
233
- No images generated yet. Start creating amazing visuals!
234
- </p>
235
- <% } %>
236
- </div>
237
-
238
- <section class="card animate__animated animate__fadeIn
239
- animate__delay-1s form-section">
240
- <form method="POST" action="/" id="generateForm">
241
- <input type="hidden" name="action" value="generate"
242
- id="formAction">
243
- <input type="hidden" name="sessionId"
244
- value="<%= sessionId %>" />
245
-
246
- <div class="grid md:grid-cols-2 gap-6 form-grid">
247
- <div>
248
- <label class="form-label">Model</label>
249
- <select name="model" id="modelSelect" required
250
- class="input-field select-field"
251
- <%= isGenerating ? 'disabled' : '' %>>
252
- <option value="">Select a model</option>
253
- </select>
254
- </div>
255
-
256
- <div>
257
- <label class="form-label">Size</label>
258
- <select name="size" id="sizeSelect" required
259
- class="input-field select-field"
260
- <%= isGenerating ? 'disabled' : '' %>>
261
- <option value="">Select size</option>
262
- </select>
263
- </div>
264
- </div>
265
-
266
- <div class="form-group">
267
- <label class="form-label">Prompt</label>
268
- <textarea name="prompt" id="promptInput" required
269
- placeholder="Describe the image you want to generate..."
270
- class="input-field textarea-field"
271
- maxlength="300"
272
- <%= isGenerating ? 'disabled' : '' %>></textarea>
273
- </div>
274
-
275
- <div class="flex justify-center gap-4">
276
- <% if (!isGenerating) { %>
277
- <button type="submit" id="submitBtn" disabled
278
- class="btn btn-primary">
279
- <svg class="button-icon" viewBox="0 0 24 24"
280
- fill="none">
281
- <path d="M3 20V4L22 12L3 20ZM5 17L16.85 12L5 7V10.5L11 12L5 13.5V17Z"
282
- fill="currentColor"/>
283
- </svg>
284
- Generate Image
285
- </button>
286
- <% } else { %>
287
- <button type="button" onclick="cancelGeneration()"
288
- class="btn btn-danger">
289
- <svg class="button-icon" viewBox="0 0 24 24"
290
- fill="none">
291
- <rect x="4" y="4" width="16" height="16" rx="3"
292
- fill="currentColor"/>
293
- </svg>
294
- Stop Generation
295
- </button>
296
- <% } %>
297
- </div>
298
- </form>
299
- </section>
300
-
301
- <section class="card animate__animated animate__fadeIn
302
- animate__delay-1s examples-section">
303
- <h3 class="examples-title">Example Prompts</h3>
304
- <div class="grid lg:grid-cols-3 md:grid-cols-2 gap-4"
305
- id="examplesGrid"></div>
306
- </section>
307
- </main>
308
-
309
- <footer class="footer-main">
310
- <div class="container mx-auto px-4 flex flex-col md:flex-row
311
- justify-between items-center gap-6">
312
- <div class="footer-copyright">© 2025 Hadad Darajat</div>
313
- <a href="https://linkedin.com/in/hadadrjt" target="_blank"
314
- class="footer-link">
315
- <svg class="footer-icon" viewBox="0 0 24 24"
316
- fill="currentColor">
317
- <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
318
- </svg>
319
- Connect with LinkedIn
320
- </a>
321
- </div>
322
- </footer>
323
- <script src="/__public__/assets/plugins/loadParameter.js"></script>
324
- <script defer src="/__public__/assets/plugins/imageGenerator.js"></script>
325
- <script defer src="/__public__/assets/plugins/webLoader.js"></script>
326
  </body>
327
  </html>
 
5
 
6
  <!DOCTYPE html>
7
  <html lang="en">
8
+ <%- include('www/head') %>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  <body data-is-generating="<%= !!isGenerating %>"
10
  data-session-id="<%= sessionId || '' %>">
11
+ <%- include('www/body') %>
12
+ <%- include('www/footer') %>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  </body>
14
  </html>
public/www/body.ejs ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ <div class="gradient-bg"></div>
7
+ <div class="gradient-mesh"></div>
8
+
9
+ <div id="welcomeModal" class="modal-overlay" style="display: none;">
10
+ <div class="modal-content">
11
+ <div class="modal-inner">
12
+ <h2 class="header-gradient animate__animated
13
+ animate__fadeInDown modal-title">
14
+ Hi there!
15
+ </h2>
16
+ <div class="animate__animated animate__fadeInUp modal-text">
17
+ Welcome to the <b>Image Generation Playground</b>,
18
+ where imagination transforms into visual creations.
19
+ <br><br>
20
+ For your information, <b>image generation</b> and
21
+ <b>OpenAI Audio TTS</b> is already built-in natively
22
+ in the primary spaces.
23
+ <br><br>
24
+ For more advanced capabilities, please visit the
25
+ <b><a href='https://umint-openwebui.hf.space'
26
+ target='_blank' style="color: var(--accent);
27
+ text-decoration: underline;">
28
+ UltimaX Intelligence</a></b> primary spaces.
29
+ <br><br>
30
+ Please consider reading the
31
+ <b><a href='https://huggingface.co/spaces/umint/ai/discussions/37'
32
+ target='_blank' style="color: var(--accent);
33
+ text-decoration: underline;">
34
+ Terms of Use and Consequences of Violation</a></b>
35
+ if you wish to proceed to the main Spaces.
36
+ <br><br>
37
+ <b>Like this project? Feel free to buy me a
38
+ <a href='https://ko-fi.com/hadad' target='_blank'
39
+ style="color: var(--accent);
40
+ text-decoration: underline;">coffee</a></b>.
41
+ </div>
42
+ <button onclick="closeWelcomeModal()"
43
+ class="btn btn-primary w-full animate__animated
44
+ animate__fadeInUp animate__delay-1s">
45
+ Get Started
46
+ </button>
47
+ </div>
48
+ </div>
49
+ </div>
50
+
51
+ <% if (error) { %>
52
+ <div id="errorModal" class="modal-overlay">
53
+ <div class="modal-content modal-error-content">
54
+ <div class="modal-inner">
55
+ <h3 class="modal-error-title">Error</h3>
56
+ <p class="modal-error-text"><%= error %></p>
57
+ <button onclick="closeErrorModal()"
58
+ class="btn btn-primary w-full">OK</button>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ <% } %>
63
+
64
+ <header class="header-main">
65
+ <div class="container mx-auto px-4">
66
+ <h1 class="header-gradient animate__animated
67
+ animate__fadeInDown header-title">
68
+ Image Generation Playground
69
+ </h1>
70
+ </div>
71
+ </header>
72
+
73
+ <main class="container mx-auto px-4 main-content">
74
+
75
+ <div class="image-output-section
76
+ <%= images && images.length > 0 ? 'has-images' : '' %>
77
+ animate__animated animate__fadeIn">
78
+ <% if (isGenerating) { %>
79
+ <div class="loading-container">
80
+ <div class="loading-spinner"
81
+ style="margin: 0 auto 20px;"></div>
82
+ <p class="loading-text">Generating your image...</p>
83
+ <div class="progress-bar">
84
+ <div class="progress-fill"
85
+ style="width: <%= progress %>%;"></div>
86
+ </div>
87
+ <p class="progress-text">
88
+ <%= progress.toFixed(0) %>% Complete
89
+ </p>
90
+ </div>
91
+ <% } else if (images && images.length > 0) { %>
92
+ <div class="image-grid">
93
+ <% images.forEach((image, index) => { %>
94
+ <div class="image-card">
95
+ <img src="data:image/png;base64,<%= image.base64 %>"
96
+ alt="<%= image.prompt %>">
97
+ <div class="image-actions">
98
+ <a href="data:image/png;base64,<%= image.base64 %>"
99
+ download="generated-<%= image.id %>.png"
100
+ class="action-btn">
101
+ <svg class="action-icon" viewBox="0 0 24 24"
102
+ fill="none">
103
+ <path d="M12 16L7 11L8.4 9.55L11
104
+ 12.15V4H13V12.15L15.6 9.55L17
105
+ 11L12 16Z"
106
+ fill="currentColor"/>
107
+ <path d="M4 20C3.45 20 2.98 19.8 2.59 19.41C2.2
108
+ 19.02 2 18.55 2 18V15H4V18H20V15H22V18C22
109
+ 18.55 21.8 19.02 21.41 19.41C21.02 19.8
110
+ 20.55 20 20 20H4Z"
111
+ fill="currentColor"/>
112
+ </svg>
113
+ </a>
114
+ <button type="button"
115
+ onclick="deleteImage(<%= index %>)"
116
+ class="action-btn">
117
+ <svg class="action-icon" viewBox="0 0 24 24"
118
+ fill="none">
119
+ <path d="M18.3 5.71C17.91 5.32 17.28 5.32 16.89
120
+ 5.71L12 10.59L7.11 5.7C6.72 5.31 6.09
121
+ 5.31 5.7 5.7C5.31 6.09 5.31 6.72 5.7
122
+ 7.11L10.59 12L5.7 16.89C5.31 17.28 5.31
123
+ 17.91 5.7 18.3C6.09 18.69 6.72 18.69
124
+ 7.11 18.3L12 13.41L16.89 18.3C17.28
125
+ 18.69 17.91 18.69 18.3 18.3C18.69 17.91
126
+ 18.69 17.28 18.3 16.89L13.41 12L18.3
127
+ 7.11C18.68 6.73 18.68 6.09 18.3 5.71Z"
128
+ fill="currentColor"/>
129
+ </svg>
130
+ </button>
131
+ </div>
132
+ <div class="image-info">
133
+ <p class="image-prompt"><%= image.prompt %></p>
134
+ <p class="image-meta">
135
+ <span class="image-model">
136
+ <%= image.model.toUpperCase() %>
137
+ </span>
138
+ | <%= image.size %>
139
+ </p>
140
+ </div>
141
+ </div>
142
+ <% }); %>
143
+ </div>
144
+ <% } else { %>
145
+ <svg class="placeholder-icon" width="80" height="80"
146
+ viewBox="0 0 24 24" fill="none">
147
+ <path d="M21 3H3C2 3 1 4 1 5V19C1 20 2 21 3 21H21C22
148
+ 21 23 20 23 19V5C23 4 22 3 21 3ZM21 19H3V5H21V19Z"
149
+ fill="currentColor"/>
150
+ <path d="M4.5 16.5L9 12L11.5 14.5L16 10L19.5 13.5"
151
+ stroke="currentColor" stroke-width="1.5"
152
+ stroke-linecap="round"/>
153
+ <circle cx="8" cy="8.5" r="1.5" fill="currentColor"/>
154
+ </svg>
155
+ <p class="placeholder-text">
156
+ No images generated yet. Start creating amazing visuals!
157
+ </p>
158
+ <% } %>
159
+ </div>
160
+
161
+ <section class="card animate__animated animate__fadeIn
162
+ animate__delay-1s form-section">
163
+ <form method="POST" action="/" id="generateForm">
164
+ <input type="hidden" name="action" value="generate"
165
+ id="formAction">
166
+ <input type="hidden" name="sessionId"
167
+ value="<%= sessionId %>" />
168
+
169
+ <div class="grid md:grid-cols-2 gap-6 form-grid">
170
+ <div>
171
+ <label class="form-label">Model</label>
172
+ <select name="model" id="modelSelect" required
173
+ class="input-field select-field"
174
+ <%= isGenerating ? 'disabled' : '' %>>
175
+ <option value="">Select a model</option>
176
+ </select>
177
+ </div>
178
+
179
+ <div>
180
+ <label class="form-label">Size</label>
181
+ <select name="size" id="sizeSelect" required
182
+ class="input-field select-field"
183
+ <%= isGenerating ? 'disabled' : '' %>>
184
+ <option value="">Select size</option>
185
+ </select>
186
+ </div>
187
+ </div>
188
+
189
+ <div class="form-group">
190
+ <label class="form-label">Prompt</label>
191
+ <textarea name="prompt" id="promptInput" required
192
+ placeholder="Describe the image you want to generate..."
193
+ class="input-field textarea-field"
194
+ maxlength="300"
195
+ <%= isGenerating ? 'disabled' : '' %>></textarea>
196
+ </div>
197
+
198
+ <div class="flex justify-center gap-4">
199
+ <% if (!isGenerating) { %>
200
+ <button type="submit" id="submitBtn" disabled
201
+ class="btn btn-primary">
202
+ <svg class="button-icon" viewBox="0 0 24 24"
203
+ fill="none">
204
+ <path d="M3 20V4L22 12L3 20ZM5 17L16.85 12L5 7V10.5L11
205
+ 12L5 13.5V17Z"
206
+ fill="currentColor"/>
207
+ </svg>
208
+ Generate Image
209
+ </button>
210
+ <% } else { %>
211
+ <button type="button" onclick="cancelGeneration()"
212
+ class="btn btn-danger">
213
+ <svg class="button-icon" viewBox="0 0 24 24"
214
+ fill="none">
215
+ <rect x="4" y="4" width="16" height="16" rx="3"
216
+ fill="currentColor"/>
217
+ </svg>
218
+ Stop Generation
219
+ </button>
220
+ <% } %>
221
+ </div>
222
+ </form>
223
+ </section>
224
+
225
+ <section class="card animate__animated animate__fadeIn
226
+ animate__delay-1s examples-section">
227
+ <h3 class="examples-title">Example Prompts</h3>
228
+ <div class="grid lg:grid-cols-3 md:grid-cols-2 gap-4"
229
+ id="examplesGrid"></div>
230
+ </section>
231
+ </main>
232
+
233
+ <script src="/__public__/assets/plugins/loadParameter.js"></script>
234
+ <script defer src="/__public__/assets/plugins/imageGenerator.js"></script>
235
+ <script defer src="/__public__/assets/plugins/webLoader.js"></script>
public/www/footer.ejs ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ <footer class="footer-main">
7
+ <div class="container mx-auto px-4 flex flex-col md:flex-row justify-between
8
+ items-center gap-6">
9
+ <div class="footer-copyright">© 2025 Hadad Darajat</div>
10
+ <a href="https://linkedin.com/in/hadadrjt" target="_blank"
11
+ class="footer-link">
12
+ <svg class="footer-icon" viewBox="0 0 24 24"
13
+ fill="currentColor">
14
+ <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037
15
+ -1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046
16
+ c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286z
17
+ M5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063
18
+ 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064
19
+ 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0
20
+ 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24
21
+ 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
22
+ </svg>
23
+ Connect with LinkedIn
24
+ </a>
25
+ </div>
26
+ </footer>
public/www/head.ejs ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!--
2
+ SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
3
+ SPDX-License-Identifier: Apache-2.0
4
+ -->
5
+
6
+ <head>
7
+ <meta charset="UTF-8">
8
+ <meta name="viewport"
9
+ content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
10
+
11
+ <meta name="author" content="Hadad Darajat" />
12
+
13
+ <meta name="description"
14
+ content="UltimaX Intelligence is a free AI platform unifying
15
+ multiple premium AI models with an intuitive
16
+ ChatGPT-like interface. Powered by Pollinations
17
+ open-source AI and integrated with OpenWebUI,
18
+ it offers advanced features, no cost, no registration,
19
+ and ensures user privacy with temporary,
20
+ unsaved conversations." />
21
+
22
+ <meta name="keywords"
23
+ content="UltimaX Intelligence, free AI platform,
24
+ premium AI models, Pollinations AI, open-source AI,
25
+ Open-WebUI integration, ChatGPT alternative,
26
+ AI tools free, no registration AI, AI privacy,
27
+ temporary AI conversations, AI platform no login,
28
+ advanced AI features, AI community powered,
29
+ seamless AI experience" />
30
+
31
+ <meta property="og:domain" content="umint-ai.hf.space" />
32
+ <meta property="og:url" content="https://umint-ai.hf.space" />
33
+ <meta property="og:title" content="UltimaX Intelligence" />
34
+
35
+ <meta property="og:description"
36
+ content="UltimaX Intelligence is a free AI platform unifying
37
+ multiple premium AI models with an intuitive
38
+ ChatGPT-like interface. Powered by Pollinations
39
+ open-source AI and integrated with OpenWebUI,
40
+ it offers advanced features, no cost, no registration,
41
+ and ensures user privacy with temporary,
42
+ unsaved conversations." />
43
+
44
+ <meta property="og:image"
45
+ content="https://cdn-uploads.huggingface.co/production/uploads/686e28b405d4ddcdd96adeb2/i9iufR3L-rgj39mk_B9QW.jpeg" />
46
+
47
+ <meta name="twitter:card" content="summary_large_image" />
48
+ <meta name="twitter:domain" content="umint-ai.hf.space" />
49
+ <meta name="twitter:url" content="https://umint-ai.hf.space" />
50
+ <meta name="twitter:title" content="UltimaX Intelligence" />
51
+
52
+ <meta name="twitter:description"
53
+ content="UltimaX Intelligence is a free AI platform unifying
54
+ multiple premium AI models with an intuitive
55
+ ChatGPT-like interface. Powered by Pollinations
56
+ open-source AI and integrated with OpenWebUI,
57
+ it offers advanced features, no cost, no registration,
58
+ and ensures user privacy with temporary,
59
+ unsaved conversations." />
60
+
61
+ <meta name="twitter:image"
62
+ content="https://cdn-uploads.huggingface.co/production/uploads/686e28b405d4ddcdd96adeb2/i9iufR3L-rgj39mk_B9QW.jpeg" />
63
+
64
+ <link rel="icon"
65
+ href="https://umint-ai.hf.space/assets/images/favicon.ico"
66
+ type="image/x-icon" />
67
+
68
+ <title>Image Generation Playground</title>
69
+
70
+ <script src="https://cdn.tailwindcss.com"></script>
71
+
72
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap"
73
+ rel="stylesheet">
74
+
75
+ <link rel="stylesheet"
76
+ href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.css"
77
+ integrity="sha512-phGxLIsvHFArdI7IyLjv14dchvbVkEDaH95efvAae/y2exeWBQCQDpNFbOTdV1p4/pIa/XtbuDCnfhDEIXhvGQ=="
78
+ crossorigin="anonymous"
79
+ referrerpolicy="no-referrer" />
80
+
81
+ <link rel="stylesheet" href="/__public__/assets/css/styles.css" />
82
+ <link rel="stylesheet" href="/__public__/assets/css/webLoader.css" />
83
+
84
+ <script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.7/dist/purify.js"></script>
85
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/validator/13.15.15/validator.js"></script>
86
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/he/1.2.0/he.js"></script>
87
+ <script src="https://cdn.jsdelivr.net/npm/xss@1.0.15/dist/xss.js"></script>
88
+
89
+ <script src="/__public__/data/models.js"></script>
90
+ <script src="/__public__/data/resolution.js"></script>
91
+ <script src="/__public__/data/examples.js"></script>
92
+ </head>
server.js CHANGED
@@ -53,10 +53,6 @@ for (const [route, target]
53
  );
54
  }
55
 
56
- app.use(express.static(
57
- path.join(__dirname, 'public')
58
- ));
59
-
60
  app.use('/', imageRoutes);
61
 
62
  initCleanup();
 
53
  );
54
  }
55
 
 
 
 
 
56
  app.use('/', imageRoutes);
57
 
58
  initCleanup();
src/controllers/imageController.js CHANGED
@@ -137,8 +137,7 @@ const handleGenerate = async (
137
  if (!validateApiConfig()) {
138
  return res.json({
139
  success: false,
140
- error: 'The server is currently busy. ' +
141
- 'Please try again later.'
142
  });
143
  }
144
 
 
137
  if (!validateApiConfig()) {
138
  return res.json({
139
  success: false,
140
+ error: 'API configuration missing'
 
141
  });
142
  }
143
 
src/services/imageGenerator.js CHANGED
@@ -36,7 +36,7 @@ const createProgressUpdater = (sessionId) => {
36
  if (data &&
37
  data.isGenerating &&
38
  data.progress < config.generation.maxProgress) {
39
- const increment = Math.random() * 20;
40
  const newProgress = Math.min(
41
  config.generation.maxProgress,
42
  data.progress + increment
@@ -110,7 +110,10 @@ export const generateImage = async (
110
  const data = getStorage(sessionId);
111
  if (!data) return;
112
 
113
- updateProgress(sessionId, 100);
 
 
 
114
 
115
  if (response.data?.data?.length > 0) {
116
  const base64 = response.data.data[0].b64_json;
@@ -139,8 +142,10 @@ export const generateImage = async (
139
 
140
  if (error.name !== 'CanceledError' &&
141
  error.code !== 'ERR_CANCELED') {
142
- data.error = 'The server is currently busy. ' +
143
- 'Please try again later.';
 
 
144
 
145
  sendToSession(sessionId, {
146
  type: 'generationError',
 
36
  if (data &&
37
  data.isGenerating &&
38
  data.progress < config.generation.maxProgress) {
39
+ const increment = Math.random() * 8;
40
  const newProgress = Math.min(
41
  config.generation.maxProgress,
42
  data.progress + increment
 
110
  const data = getStorage(sessionId);
111
  if (!data) return;
112
 
113
+ updateProgress(
114
+ sessionId,
115
+ config.generation.maxProgress
116
+ );
117
 
118
  if (response.data?.data?.length > 0) {
119
  const base64 = response.data.data[0].b64_json;
 
142
 
143
  if (error.name !== 'CanceledError' &&
144
  error.code !== 'ERR_CANCELED') {
145
+ data.error =
146
+ `The request to the ${model} model was ` +
147
+ `unsuccessful, possibly due to high ` +
148
+ `server load. Please try again later.`;
149
 
150
  sendToSession(sessionId, {
151
  type: 'generationError',
src/utils/idGenerator.js CHANGED
@@ -3,8 +3,8 @@
3
  // SPDX-License-Identifier: Apache-2.0
4
  //
5
 
 
 
6
  export const generateId = () => {
7
- return Math.random()
8
- .toString(36)
9
- .substring(2, 15);
10
  };
 
3
  // SPDX-License-Identifier: Apache-2.0
4
  //
5
 
6
+ import { randomBytes } from 'crypto';
7
+
8
  export const generateId = () => {
9
+ return randomBytes(32).toString('hex');
 
 
10
  };