yasir commited on
Commit
8adf10a
·
verified ·
1 Parent(s): 2329a9c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +7 -243
index.html CHANGED
@@ -1,7 +1,6 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
-
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
@@ -374,13 +373,13 @@ margin: auto;
374
 
375
  <div id="as">
376
  <select name="" id="model">
377
- <option value="focus" class="mod" selected>Fooocus (Best)</option>
378
- <option value="ar" class="mod">SDXL</option>
379
 
380
  <option value="rv6" class="mod">Ptoteus v0.2</option>
381
  <option value="ds8" class="mod">Dreamshaper xl turbo</option>
382
  <option value="er" class="mod">pixart alpha</option>
383
-
384
  <option value="ra" class="mod">playground v2</option>
385
  <option value="anything" class="mod">Anything v4 (Anime)</option>
386
 
@@ -399,7 +398,7 @@ margin: auto;
399
  <p style="font-size: 23px; font-family: 'Barlow Condensed'; margin: 0px; color: rgb(197, 14, 188);">Styles: </p>
400
  <div id="styles">
401
 
402
- <p>Fumes AI</p>
403
  <input type="radio" name="style" value="fumes" id="fumes">
404
  <p>Realistic</p>
405
  <input type="radio" name="style" value="real">
@@ -421,7 +420,7 @@ margin: auto;
421
  </div>
422
  <div id="sli">
423
  <label for="#gds">Guidence Scale: </label>
424
- <input type="range" id="gds" value="7.5" min="5" max="14" step="1"><p id="gdsp">7.5</p>
425
  </div>
426
  <div id="sli">
427
  <label for="#step">Steps: </label>
@@ -440,243 +439,8 @@ margin: auto;
440
  </div>
441
 
442
 
443
-
444
-
445
- <script>
446
- document.getElementById('jd').onclick = ()=>{
447
- window.open('https://discord.gg/ju4yQBfQ7p')
448
- }
449
- /*document.getElementById('ow').onclick = ()=>{
450
- window.open('https://www.buymeacoffee.com/mygx')
451
- }*/
452
- document.getElementById('fumes').checked = true
453
- let dialog = document.getElementById('dialog')
454
- let openbtn = document.getElementById('Advance Setting')
455
- let closebtn = document.getElementById('close')
456
- openbtn.onclick = ()=>{
457
- dialog.show()
458
- document.getElementById('imshow').style.border = '0px solid black transparent'
459
- }
460
- closebtn.onclick= ()=>{
461
- dialog.close()
462
- document.getElementById('imshow').style.background = 'linear-gradient(black, black) padding-box,linear-gradient(to right, red, blue) border-box'
463
- }
464
- let inp = document.getElementById('inp')
465
- let np = document.getElementById('np')
466
- let gd = document.getElementById('gds')
467
- let step = document.getElementById('step')
468
- let seed = document.getElementById('seed')
469
- let seedp = document.getElementById('seedp')
470
- let stepp = document.getElementById('stepp')
471
- let gdsp = document.getElementById('gdsp')
472
- let btn = document.getElementById('create')
473
- gd.addEventListener('input',()=>{
474
- gdsp.innerText = gd.value
475
- })
476
- step.addEventListener('input',()=>{
477
- stepp.innerText = step.value
478
- })
479
- seed.addEventListener('input',()=>{
480
- seedp.innerText = seed.value
481
- })
482
- let prompt = ',RAW photo,dynamic lights, photorealistic, extremely detailed informations, dynamic colors,realistic'
483
- 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'
484
- document.getElementById('styles').onchange = ()=>{
485
- const selectedStyle = document.querySelector('input[name="style"]:checked');
486
- if(selectedStyle.value =='photo'){
487
- prompt = ' ,RAW photo, portrait photo,(high detailed skin:1. 2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm'
488
- 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'
489
- }
490
- if(selectedStyle.value == 'cinema'){
491
- prompt = ' ,cinematic film still awardwinning photo, highly detailed, high budget, bokeh, cinemascope, moody, epic, gorgeous, film grain, grainy'
492
- 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'
493
- }
494
- if(selectedStyle.value == 'real'){
495
- 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'
496
- 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'
497
- }
498
- if(selectedStyle.value == 'fantasy'){
499
- prompt = ' ,centered shot, wide angle, full body, dd, fantasy, highly detailed, digital painting, artstation, smooth, sharp focus, digital art'
500
- 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'
501
- }
502
- if(selectedStyle.value == 'anime'){
503
- prompt = ' ,masterpiece,HDR,anime,anime style,beuatiful anime'
504
- 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'
505
- }
506
- if(selectedStyle.value == 'fumes'){
507
- let prompt = ' ,RAW photo,dynamic lights, photorealistic, extremely detailed informations, dynamic colors,realistic,SciFi,award winning photography,film grain,beautiful,attarctive'
508
- 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'
509
- }
510
- if(selectedStyle.value == 'no'){
511
- prompt = ''
512
- nps = ''
513
- }
514
- }
515
- isf = false
516
- btn.onclick = async ()=>{
517
- let url2 = 'https://api-cmgn.onrender.com/get_prediction'
518
- let idlist = []
519
- url = 'https://flask-hello-world-murex-sigma.vercel.app/predict'
520
- var selectElement = document.getElementById("model");
521
- var selectedIndex = selectElement.selectedIndex;
522
- if (selectedIndex === -1) {
523
- console.log("No option is selected.");
524
- } else {
525
- var selectedOption = selectElement.options[selectedIndex];
526
-
527
- if(selectedOption.value == 'rv6'){
528
- url = 'https://flask-hello-world-murex-sigma.vercel.app/proteus'
529
-
530
- }
531
- if(selectedOption.value == 'ds8'){
532
- url = 'https://flask-hello-world-murex-sigma.vercel.app/dream'
533
- if(step.value>50){
534
- step.value = 50
535
- }
536
-
537
- }
538
- if(selectedOption.value == 'ra'){
539
- url = 'https://flask-hello-world-murex-sigma.vercel.app/playground'
540
-
541
- }
542
- if(selectedOption.value == 'ar'){
543
- url = 'https://flask-hello-world-murex-sigma.vercel.app/predict'
544
-
545
- }
546
- if(selectedOption.value == 'er'){
547
- url = 'https://flask-hello-world-murex-sigma.vercel.app/pixart'
548
-
549
- }
550
- if(selectedOption.value == 'anything'){
551
- url = 'https://flask-hello-world-murex-sigma.vercel.app/anything'
552
-
553
- }
554
- if(selectedOption.value == 'focus'){
555
- url = 'https://flask-hello-world-murex-sigma.vercel.app/focus'
556
- url2 = 'https://api-cmgn.onrender.com/foocus'
557
- isf = true
558
- }
559
- }
560
- negative_prompt = nps
561
- btn.disabled = true
562
- const div = document.getElementById('imshow');
563
- div.innerHTML = '';
564
- document.getElementById('imshow').innerHTML = ''
565
- let pi = document.createElement('p')
566
- pi.innerText = 'Generating Image... Estimated Time: 20s'
567
- document.getElementById('imshow').append(pi)
568
- let count = 0;
569
- seed = seed
570
- async function generate(){
571
-
572
- const params = {
573
- 'prompt': inp.value+prompt,
574
- 'negative_prompt': np.value+nps,
575
- "steps": step.value,
576
- 'gd': gd.value
577
- };
578
-
579
- try {
580
- const response = await fetch(url, {
581
- method: 'POST',
582
- headers: {
583
- 'Content-Type': 'application/json',
584
- 'Connection': 'keep-alive',
585
- },
586
- body: JSON.stringify(params)
587
- });
588
- /* console.log(np.value)
589
- const imgData = await response.text();
590
- const div = document.getElementById('imshow')
591
- const img = document.createElement('img');
592
- pi.innerHTML = ''
593
- pi.innerText = ''
594
- img.src = imgData;
595
- div.appendChild(img);
596
- */
597
-
598
- const imgData = await response.text();
599
- idlist.push(imgData)
600
-
601
-
602
- } catch (error) {
603
- btn.disabled = false
604
- console.error('An error occurred:', error);
605
- pi.innerText = 'An error occurred, try changing your prompt';
606
- }
607
- }
608
-
609
- await Promise.all([generate(), generate()]);
610
-
611
- setTimeout(()=>{
612
- function final2(){
613
- const id = idlist[1].trim().replace(/^"|"$/g, '');
614
- fetch(url2, {
615
- method: 'POST',
616
- headers: {
617
- 'Content-Type': 'application/json',
618
- },
619
- body: JSON.stringify({
620
- id: id,
621
- }),
622
- })
623
- .then((response) => response.text())
624
- .then((data) => {
625
- const img = document.createElement('img');
626
- pi.innerHTML = ''
627
- pi.innerText = ''
628
- img.src = data.trim().replace(/^"|"$/g, '');
629
- div.appendChild(img);
630
- btn.disabled = false
631
- console.log(data)
632
- })
633
- .catch((error) =>{
634
- btn.disabled = false
635
- console.error('An error occurred:', error);
636
- pi.innerText = 'An error occurred, try changing your prompt';
637
- });
638
- }
639
- function final1(){
640
- const id = idlist[0].trim().replace(/^"|"$/g, '');
641
- fetch(url2, {
642
- method: 'POST',
643
- headers: {
644
- 'Content-Type': 'application/json',
645
- },
646
- body: JSON.stringify({
647
- id: id,
648
- }),
649
- })
650
- .then((response) => response.text())
651
- .then((data) => {
652
- const img = document.createElement('img');
653
- pi.innerHTML = ''
654
- pi.innerText = ''
655
- img.src = data.trim().replace(/^"|"$/g, '');
656
- div.appendChild(img);
657
- btn.disabled = false
658
- console.log(data)
659
- })
660
- .catch((error) => {
661
- btn.disabled = false
662
- console.error('An error occurred:', error);
663
- pi.innerText = 'An error occurred, try changing your prompt';
664
- });
665
- }
666
-
667
- final2()
668
- final1()
669
- },21000)
670
-
671
-
672
-
673
- }
674
-
675
-
676
-
677
- </script>
678
-
679
 
680
 
681
  </body>
682
- </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
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
 
373
 
374
  <div id="as">
375
  <select name="" id="model">
376
+ <option value="focus" class="mod" selected>Fooocus (Best)</option>
377
+ <option value="ar" class="mod" >SDXL</option>
378
 
379
  <option value="rv6" class="mod">Ptoteus v0.2</option>
380
  <option value="ds8" class="mod">Dreamshaper xl turbo</option>
381
  <option value="er" class="mod">pixart alpha</option>
382
+
383
  <option value="ra" class="mod">playground v2</option>
384
  <option value="anything" class="mod">Anything v4 (Anime)</option>
385
 
 
398
  <p style="font-size: 23px; font-family: 'Barlow Condensed'; margin: 0px; color: rgb(197, 14, 188);">Styles: </p>
399
  <div id="styles">
400
 
401
+ <p>AI Generarted (FumesAI)<p>
402
  <input type="radio" name="style" value="fumes" id="fumes">
403
  <p>Realistic</p>
404
  <input type="radio" name="style" value="real">
 
420
  </div>
421
  <div id="sli">
422
  <label for="#gds">Guidence Scale: </label>
423
+ <input type="range" id="gds" value="7" min="5" max="20" step="1"><p id="gdsp">7</p>
424
  </div>
425
  <div id="sli">
426
  <label for="#step">Steps: </label>
 
439
  </div>
440
 
441
 
442
+ <script src="script.js"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
 
444
 
445
  </body>
446
+ </html>