basit123796 commited on
Commit
eae5ec5
·
verified ·
1 Parent(s): 202dda4

Upload 2 files

Browse files
Files changed (2) hide show
  1. index.html +649 -0
  2. style.css +28 -0
index.html ADDED
@@ -0,0 +1,649 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <script type='text/javascript'>
7
+ window.smartlook||(function(d) {
8
+ var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
9
+ var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
10
+ c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
11
+ })(document);
12
+ smartlook('init', 'ab064cf709cc86cb945d2dfb051a3a1254d7fb19', { region: 'eu' });
13
+ </script>
14
+ <link rel="preconnect" href="https://fonts.googleapis.com">
15
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
16
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css">
17
+ <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@100&display=swap" rel="stylesheet" <meta
18
+ charset="UTF-8">
19
+ <title>AI Image Creator</title>
20
+ <style>
21
+ html, body {
22
+ margin: 0;
23
+ padding: 0;
24
+ box-sizing: border-box;
25
+ overflow-x: hidden !important;
26
+ }
27
+ body {
28
+ background-color: #000000;
29
+ margin: 0;
30
+ }
31
+ #main {
32
+ display: flex;
33
+ flex-direction: column;
34
+ margin: 50px;
35
+ margin: auto;
36
+ }
37
+ #cont {
38
+ background-color: #030303;
39
+ padding: 0px;
40
+ border-radius: 12px;
41
+ box-shadow: 8px 8px 16px #050505, -8px -8px 16px #080808;
42
+ display: flex;
43
+ align-items: center;
44
+ border: 2px solid rgb(247, 6, 187);
45
+ width: 70%;
46
+ height: 9vh;
47
+ margin: auto;
48
+ margin-top: 5%;
49
+ margin-bottom: 20px;
50
+ }
51
+ #inp {
52
+ flex-grow: 1;
53
+ padding: 10px;
54
+ margin: 10px;
55
+ background: transparent;
56
+ border: none;
57
+ border-radius: 8px;
58
+ box-shadow: linear-gradient(145deg, rgb(0, 249, 153), #ff002b);
59
+ color: #fff;
60
+ outline: none;
61
+ }
62
+ #cont button {
63
+ padding: 2.5vh 4.6vh;
64
+ margin: 1vh;
65
+ background: linear-gradient(145deg, rgb(0, 149, 249), #ff0095, rgb(255, 0, 43));
66
+ border: none;
67
+ border-radius: 8px;
68
+ color: #fff;
69
+ cursor: pointer;
70
+ }
71
+ #cont button:hover {
72
+ background: linear-gradient(145deg, #00ffab, #4e00f9, rgb(255, 0, 43));
73
+ }
74
+ #as {
75
+ display: flex;
76
+ flex-direction: row;
77
+ width: 70%;
78
+ margin: auto;
79
+ justify-content: space-between;
80
+ }
81
+ #as button {
82
+ background-color: #0a0a0a;
83
+ border: none;
84
+ padding: 3vh 4.5vh;
85
+ font-size: 15px;
86
+ color: #ffffff;
87
+ cursor: pointer;
88
+ border-radius: 12px;
89
+ transition: box-shadow 0.3s ease-in-out;
90
+ }
91
+ #model{
92
+ background-color: #181717;
93
+ border: none;
94
+ padding: 3vh 4.5vh;
95
+ font-size: 15px;
96
+ color: #ffffff;
97
+ cursor: pointer;
98
+ border-radius: 12px;
99
+ transition: box-shadow 0.3s ease-in-out;
100
+
101
+ padding: 0px 0px 0px 20px ;
102
+ }
103
+ #as button:hover {
104
+ box-shadow: 15px 15px 30px #0d0d0d, -15px -15px 30px #1a1a1a; /* Adjusted shadow and highlight on hover */
105
+ }
106
+ @media only screen and (max-width: 600px) {
107
+ #cont {
108
+ width: 90%;
109
+ margin-bottom: 20px;
110
+ }
111
+ #main{
112
+ width: 90%;
113
+ }
114
+ #cont button {
115
+ padding: 15px 15px; /* Adjust button padding for smaller screens */
116
+ }
117
+ #as{
118
+ width: 88%;
119
+ }
120
+ #as button{
121
+
122
+ padding: 15px 20px; /* Adjust button padding for smaller screens */
123
+ }
124
+ .mod{
125
+
126
+ }
127
+ }
128
+ @media only screen and (max-width: 365px){
129
+ #cont{
130
+ width: 94%;
131
+ }
132
+ #main{
133
+ width: 94%;
134
+ }
135
+ #as{
136
+ width: 94%;
137
+ }
138
+ }
139
+ dialog{
140
+ background: rgba(29, 29, 29, 1);
141
+ border-radius: 16px;
142
+ box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
143
+ margin-top: 20px;
144
+ border: 1px solid rgba(14, 13, 13, 0.3);
145
+ }
146
+ #sli{
147
+ display: flex;
148
+ flex-direction: row;
149
+ align-items: center;
150
+ color: #eeeeee;
151
+ }
152
+ label{
153
+ font-family: 'Barlow Condensed';
154
+
155
+ font-size: 21px;
156
+ margin-right: 10px;
157
+ }
158
+ #sli input{
159
+ border: 1px solid rgb(137, 9, 223);
160
+ outline: none;
161
+ border-radius: 5px;
162
+ padding: 7px 20px;
163
+ background-color: transparent ;
164
+ color: white;
165
+ font-family: 'Barlow Condensed';
166
+ }
167
+ #Apply{
168
+ background-color: rgb(0, 247, 173);
169
+ padding: 5px 10px;
170
+ border: none;
171
+ color: #000000;
172
+ font-weight:500;
173
+ font-family: Arial, Helvetica, sans-serif;
174
+ font-size: 15px;
175
+ border-radius: 4px;
176
+ }
177
+ #close{
178
+ float: right;background-color: rgb(223, 7, 79); padding: 5px 10px;
179
+ border: none;
180
+ color: #000000;
181
+ font-weight:500;
182
+ font-family: Arial, Helvetica, sans-serif;
183
+ font-size: 15px;
184
+ border-radius: 4px;
185
+ }
186
+ #styles{
187
+ display: flex;
188
+ flex-direction: row;
189
+ gap: 6px;
190
+ color: white;
191
+ font-family: 'Barlow Condensed';
192
+ font-size: 20px;
193
+ flex-wrap: wrap;
194
+
195
+ }
196
+ #imshow{
197
+
198
+ width: 100.5vh;
199
+ height: 50vh;
200
+ display: flex;
201
+ flex-direction: row;
202
+ overflow-y: hidden;
203
+ margin: auto;
204
+ gap: 6px;
205
+ margin-top: 30px;
206
+ padding-bottom: 4px;
207
+ background: linear-gradient(black, black) padding-box,
208
+ linear-gradient(to right, red, blue) border-box;
209
+ border-radius: 20px;
210
+ border: 2.5px solid transparent;
211
+
212
+ }
213
+ #imshow img{
214
+ width: 49vh;
215
+ height: 48vh;
216
+ margin: auto;
217
+ margin-top: 7px;
218
+ border-radius: 10px;
219
+ }
220
+ #imshow p{
221
+ color: white;font-family: 'Barlow Condensed'; margin: auto; font-size: 3vh;text-align: center;
222
+ }
223
+ @media screen and (min-width: 500px) and (max-width: 720px) {
224
+ dialog{
225
+
226
+ max-width: 420px;
227
+ }
228
+ #imshow{
229
+
230
+ border: 2px solid blue;
231
+ width: 400px;
232
+ height: 400px;
233
+ display: flex;
234
+ flex-direction: column;
235
+ overflow-y: scroll;
236
+ margin: auto;
237
+ background: linear-gradient(black, black) padding-box,
238
+ linear-gradient(to right, red, blue) border-box;
239
+ border-radius: 20px;
240
+ border: 2.5px solid transparent;
241
+ margin-top: 30px;
242
+ padding-bottom: 7px;
243
+ gap: 14px;
244
+ }
245
+ #imshow img{
246
+ width: 95%;
247
+ height: 100%;
248
+ margin: auto;
249
+ margin-top: 7px;
250
+ }
251
+ #cont{
252
+ height: 7vh;
253
+ }
254
+ }
255
+ #styles{
256
+ align-items: center;
257
+ justify-content: center;
258
+ }
259
+ @media screen and (max-width: 500px) {
260
+ dialog {
261
+ max-width: 300px;
262
+ }
263
+ #imshow{
264
+
265
+ border: 2px solid blue;
266
+ width: 330px;
267
+ height: 330px;
268
+ display: flex;
269
+ flex-direction: column;
270
+ overflow-y: scroll;
271
+ margin: auto;
272
+ margin-top: 30px;
273
+ padding-bottom: 7px;
274
+ gap: 14px;
275
+ background: linear-gradient(black, black) padding-box,
276
+ linear-gradient(to right, red, blue) border-box;
277
+ border-radius: 20px;
278
+ border: 2.5px solid transparent;
279
+ }
280
+ #imshow p{
281
+ width: 80%;
282
+ }
283
+ #imshow img{
284
+ width: 95%;
285
+ height: 100%;
286
+ margin: auto;
287
+ }
288
+ #imshow p{
289
+ font-size: 20px;
290
+ }
291
+ #styles{
292
+ align-items: center;
293
+ justify-content: center;
294
+ }
295
+ }
296
+ #jd{
297
+ margin: 20px;
298
+ padding: 10px;
299
+ background-color: transparent;
300
+ color: #eeeeee;
301
+ background: linear-gradient(black, black) padding-box,
302
+ linear-gradient(to right, #00ffdd, blue) border-box;
303
+ border-radius: 20px;
304
+ border: 2.5px solid transparent;
305
+ border-radius: 10px;
306
+ margin-bottom: 0px;
307
+ }
308
+ #jd:hover{
309
+ background: linear-gradient(black, black) padding-box,
310
+ linear-gradient(to right, blue,#00ffdd) border-box;
311
+ border-radius: 10px;
312
+ border: 2.5px solid transparent;
313
+ }
314
+ #ow{
315
+ float: right;
316
+ margin: 20px;
317
+ padding: 10px;
318
+ background-color: transparent;
319
+ color: #eeeeee;
320
+ background: linear-gradient(black, black) padding-box,
321
+ linear-gradient(to right, rgb(0, 255, 149), rgb(174, 0, 255)) border-box;
322
+ border-radius: 10px;
323
+ border: 2.5px solid transparent;
324
+ border-radius: 10px;
325
+ margin-bottom: 0px;
326
+ }
327
+ #ow:hover{
328
+ background: linear-gradient(black, black) padding-box,
329
+ linear-gradient(to right, rgb(174, 0, 255),rgb(0, 255, 149)) border-box;
330
+ border-radius: 10px;
331
+ border: 2.5px solid transparent;
332
+ }
333
+ #dvv{
334
+ width: 94%;
335
+ margin: auto;
336
+ }
337
+ #model{
338
+ width: 170px;
339
+ height: 50px;
340
+ overflow: visible;
341
+ }
342
+ #model option{
343
+ white-space: normal;
344
+ }
345
+ </style>
346
+ </head>
347
+ <body>
348
+ <div id="dvv">
349
+ <button id="jd">
350
+ Join discord
351
+ </button>
352
+ <!--<button id="ow">
353
+ Donate
354
+ </button>-->
355
+ </div>
356
+ <div id="main">
357
+ <div id="cont">
358
+ <input type="text" name="" id="inp" placeholder=" Enter Prompt here..">
359
+ <button id="create">Create </button>
360
+ </div>
361
+
362
+ <div id="as">
363
+ <select name="" id="model">
364
+
365
+
366
+ <option value="ra" class="mod">playground v2</option>
367
+
368
+
369
+ </select>
370
+ <div id="Advance Setting"><button>Setting</button></div>
371
+ </div>
372
+
373
+ </div>
374
+
375
+
376
+
377
+
378
+
379
+ <dialog id="dialog">
380
+
381
+ <p style="font-size: 23px; font-family: 'Barlow Condensed'; margin: 0px; color: rgb(197, 14, 188);">Styles: </p>
382
+ <div id="styles">
383
+
384
+ <p>Fumes AI</p>
385
+ <input type="radio" name="style" value="fumes" id="fumes">
386
+ <p>Realistic</p>
387
+ <input type="radio" name="style" value="real">
388
+ <p>Anime</p>
389
+ <input type="radio" name="style" value="anime">
390
+ <p>Photography</p>
391
+ <input type="radio" name="style" value="photo">
392
+ <p>Cinematic</p>
393
+ <input type="radio" name="style" value="cinema">
394
+ <p>Fantasy</p>
395
+ <input type="radio" name="style" value="fantasy">
396
+ <p>No Style</p>
397
+ <input type="radio" name="style" value="no">
398
+ </div>
399
+
400
+ <div id="sli">
401
+ <label for="#np" style="margin-bottom: 15px;">Negative Prompt: </label>
402
+ <input type="text" placeholder="Negative prompt" id="np" style="margin-bottom: 15px;">
403
+ </div>
404
+ <div id="sli">
405
+ <label for="#gds">Guidence Scale: </label>
406
+ <input type="range" id="gds" value="7.5" min="5" max="14" step="1"><p id="gdsp">7.5</p>
407
+ </div>
408
+ <div id="sli">
409
+ <label for="#step">Steps: </label>
410
+ <input type="range" id="step" value="50" min="30" max="100" step="1"><p id="stepp">50</p>
411
+ </div>
412
+ <div id="sli">
413
+ <label for="#gds">Seed: </label>
414
+ <input type="range" id="seed" min="0" value="0" step="1" max="99999"><p id="seedp">0</p>
415
+ </div>
416
+
417
+ <button id="close">Close</button>
418
+ </dialog>
419
+
420
+ <div id="imshow">
421
+ <p>Your Generarted Arts Will appear Here</p>
422
+ </div>
423
+
424
+
425
+
426
+
427
+ <script>
428
+ document.getElementById('jd').onclick = ()=>{
429
+ window.open('https://discord.gg/ju4yQBfQ7p')
430
+ }
431
+ /*document.getElementById('ow').onclick = ()=>{
432
+ window.open('https://www.buymeacoffee.com/mygx')
433
+ }*/
434
+ document.getElementById('fumes').checked = true
435
+ let dialog = document.getElementById('dialog')
436
+ let openbtn = document.getElementById('Advance Setting')
437
+ let closebtn = document.getElementById('close')
438
+ openbtn.onclick = ()=>{
439
+ dialog.show()
440
+ document.getElementById('imshow').style.border = '0px solid black transparent'
441
+ }
442
+ closebtn.onclick= ()=>{
443
+ dialog.close()
444
+ document.getElementById('imshow').style.background = 'linear-gradient(black, black) padding-box,linear-gradient(to right, red, blue) border-box'
445
+ }
446
+ let inp = document.getElementById('inp')
447
+ let np = document.getElementById('np')
448
+ let gd = document.getElementById('gds')
449
+ let step = document.getElementById('step')
450
+ let seed = document.getElementById('seed')
451
+ let seedp = document.getElementById('seedp')
452
+ let stepp = document.getElementById('stepp')
453
+ let gdsp = document.getElementById('gdsp')
454
+ let btn = document.getElementById('create')
455
+ gd.addEventListener('input',()=>{
456
+ gdsp.innerText = gd.value
457
+ })
458
+ step.addEventListener('input',()=>{
459
+ stepp.innerText = step.value
460
+ })
461
+ seed.addEventListener('input',()=>{
462
+ seedp.innerText = seed.value
463
+ })
464
+ let prompt = ',RAW photo,dynamic lights, photorealistic, extremely detailed informations, dynamic colors,realistic'
465
+ let nps = ' ,poorly drawn,malformed hands,malformed fingers,malformed faces,malfromed eyes,mutated fingers,malformed body parts,mutated body parts,mutated hands, disfigured,oversaturated,bad anatomy,deformed body features ,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
466
+ document.getElementById('styles').onchange = ()=>{
467
+ const selectedStyle = document.querySelector('input[name="style"]:checked');
468
+ if(selectedStyle.value =='photo'){
469
+ prompt = ' ,RAW photo, portrait photo,(high detailed skin:1. 2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm'
470
+ nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck'
471
+ }
472
+ if(selectedStyle.value == 'cinema'){
473
+ prompt = ' ,cinematic film still awardwinning photo, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy'
474
+ nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck'
475
+ }
476
+ if(selectedStyle.value == 'real'){
477
+ prompt = ' ,RAW candid cinema,Modern colors, 16mm, beautiful,attractive,color graded portra 400 film, remarkable color, ultra realistic, textured skin, remarkable detailed pupils, realistic dull skin noise, visible skin detail, skin fuzz, dry skin, shot with cinematic camera, sun soaked colors'
478
+ nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,poorly drawn,lowres, disfigured,bad anatomy,deformed body features ,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
479
+ }
480
+ if(selectedStyle.value == 'fantasy'){
481
+ prompt = ' ,centered shot, wide angle, full body, dd, fantasy, highly detailed, digital painting, artstation, smooth, sharp focus, digital art'
482
+ nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,malformed hands,malformed fingers,malformed faces,malfromed eyes,malformed body parts,mutated body parts,mutated fingers,mutated hands,missing legs, missing feet, worst quality, low quality, jpeg artifacts, signature, logo, watermark, text, realistic, hyper-realistic, ultra-detailed, RAW photo'
483
+ }
484
+ if(selectedStyle.value == 'anime'){
485
+ prompt = ' ,masterpiece,HDR,anime,anime style,beuatiful anime'
486
+ nps = ' ,malformed hands,malformed fingers,malformed faces,malformed body parts,mutated body parts,malfromed eyes,mutated fingers,mutated hands,realistic,worst quality, low quality, blurry, pixelated, extra limb, extra fingers, bad hand, text, name, letters, out of frame, lowres, text, error, cropped, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature'
487
+ }
488
+ if(selectedStyle.value == 'fumes'){
489
+ let prompt = ' ,RAW photo,dynamic lights, photorealistic, extremely detailed informations, dynamic colors,realistic,SciFi,award winning photography,film grain,beautiful,attarctive'
490
+ let nps = ' ,deformed fingers,mutated hands,unrealistic hands,extra fingers,less fingers,mutated eyes,poorly drawn,malformed hands,malformed fingers,malformed faces,malformed body parts,mutated body parts,malfromed eyes,mutated fingers,mutated hands, disfigured,oversaturated,bad anatomy,deformed body features ,cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
491
+ }
492
+ if(selectedStyle.value == 'no'){
493
+ prompt = ''
494
+ nps = ''
495
+ }
496
+ }
497
+ btn.onclick = async ()=>{
498
+ let url2 = 'https://api-cmgn.onrender.com/get_prediction'
499
+ let idlist = []
500
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/playground'
501
+ var selectElement = document.getElementById("model");
502
+ var selectedIndex = selectElement.selectedIndex;
503
+ if (selectedIndex === -1) {
504
+ console.log("No option is selected.");
505
+ } else {
506
+ var selectedOption = selectElement.options[selectedIndex];
507
+
508
+ if(selectedOption.value == 'rv6'){
509
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/proteus'
510
+
511
+ }
512
+ if(selectedOption.value == 'ds8'){
513
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/dream'
514
+ if(step.value>50){
515
+ step.value = 50
516
+ }
517
+
518
+ }
519
+ if(selectedOption.value == 'ra'){
520
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/playground'
521
+
522
+ }
523
+ if(selectedOption.value == 'ar'){
524
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/predict'
525
+
526
+ }
527
+ if(selectedOption.value == 'er'){
528
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/pixart'
529
+
530
+ }
531
+ if(selectedOption.value == 'anything'){
532
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/anything'
533
+
534
+ }
535
+ if(selectedOption.value == 'focus'){
536
+ url = 'https://flask-hello-world-murex-sigma.vercel.app/focus'
537
+ url2 = 'https://api-cmgn.onrender.com/foocus'
538
+ }
539
+ }
540
+ negative_prompt = nps
541
+ btn.disabled = true
542
+ const div = document.getElementById('imshow');
543
+ div.innerHTML = '';
544
+ document.getElementById('imshow').innerHTML = ''
545
+ let pi = document.createElement('p')
546
+ pi.innerText = 'Generating Image... generation Usually Complete Within 15 seconds'
547
+ document.getElementById('imshow').append(pi)
548
+ let count = 0;
549
+ seed = seed
550
+ async function generate(){
551
+
552
+ const params = {
553
+ 'prompt': inp.value+prompt,
554
+ 'negative_prompt': np.value+nps,
555
+ "steps": step.value,
556
+ 'gd': gd.value
557
+ };
558
+ try {
559
+ const response = await fetch(url, {
560
+ method: 'POST',
561
+ headers: {
562
+ 'Content-Type': 'application/json',
563
+ 'Connection': 'keep-alive',
564
+ },
565
+ body: JSON.stringify(params)
566
+ });
567
+ /* console.log(np.value)
568
+ const imgData = await response.text();
569
+ const div = document.getElementById('imshow')
570
+ const img = document.createElement('img');
571
+ pi.innerHTML = ''
572
+ pi.innerText = ''
573
+ img.src = imgData;
574
+ div.appendChild(img);
575
+ */
576
+
577
+ const imgData = await response.text();
578
+ idlist.push(imgData)
579
+
580
+
581
+ } catch (error) {
582
+ btn.disabled = false
583
+ console.error('An error occurred:', error);
584
+ pi.innerText = 'An error occurred, try changing your prompt';
585
+ }
586
+ }
587
+ await Promise.all([generate(), generate()]);
588
+ function final2(){
589
+ const id = idlist[1].trim().replace(/^"|"$/g, '');
590
+ fetch(url2, {
591
+ method: 'POST',
592
+ headers: {
593
+ 'Content-Type': 'application/json',
594
+ },
595
+ body: JSON.stringify({
596
+ id: id,
597
+ }),
598
+ })
599
+ .then((response) => response.text())
600
+ .then((data) => {
601
+ const img = document.createElement('img');
602
+ pi.innerHTML = ''
603
+ pi.innerText = ''
604
+ img.src = data.trim().replace(/^"|"$/g, '');
605
+ div.appendChild(img);
606
+ btn.disabled = false
607
+ console.log(data)
608
+ })
609
+ .catch((error) =>{
610
+ btn.disabled = false
611
+ console.error('An error occurred:', error);
612
+ pi.innerText = 'An error occurred, try changing your prompt';
613
+ });
614
+ }
615
+ function final1(){
616
+ const id = idlist[0].trim().replace(/^"|"$/g, '');
617
+ fetch(url2, {
618
+ method: 'POST',
619
+ headers: {
620
+ 'Content-Type': 'application/json',
621
+ },
622
+ body: JSON.stringify({
623
+ id: id,
624
+ }),
625
+ })
626
+ .then((response) => response.text())
627
+ .then((data) => {
628
+ const img = document.createElement('img');
629
+ pi.innerHTML = ''
630
+ pi.innerText = ''
631
+ img.src = data.trim().replace(/^"|"$/g, '');
632
+ div.appendChild(img);
633
+ btn.disabled = false
634
+ console.log(data)
635
+ })
636
+ .catch((error) => {
637
+ btn.disabled = false
638
+ console.error('An error occurred:', error);
639
+ pi.innerText = 'An error occurred, try changing your prompt';
640
+ });
641
+ }
642
+ final2()
643
+ final1()
644
+ }
645
+ </script>
646
+
647
+
648
+
649
+ </body>
style.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ padding: 2rem;
3
+ font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
+ }
5
+
6
+ h1 {
7
+ font-size: 16px;
8
+ margin-top: 0;
9
+ }
10
+
11
+ p {
12
+ color: rgb(107, 114, 128);
13
+ font-size: 15px;
14
+ margin-bottom: 10px;
15
+ margin-top: 5px;
16
+ }
17
+
18
+ .card {
19
+ max-width: 620px;
20
+ margin: 0 auto;
21
+ padding: 16px;
22
+ border: 1px solid lightgray;
23
+ border-radius: 16px;
24
+ }
25
+
26
+ .card p:last-child {
27
+ margin-bottom: 0;
28
+ }