yasir commited on
Commit
87f2f9d
1 Parent(s): 657d0c9

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +10 -167
index.html CHANGED
@@ -1,6 +1,14 @@
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">
@@ -450,173 +458,8 @@ font-family: 'Barlow Condensed';
450
 
451
 
452
  </div>
453
- <script>document.getElementById('jd').onclick = ()=>{
454
- window.open('https://discord.gg/ju4yQBfQ7p')
455
- }
456
-
457
-
458
-
459
- /*document.getElementById('ow').onclick = ()=>{
460
- window.open('https://www.buymeacoffee.com/mygx')
461
- }*/
462
-
463
- let dialog = document.getElementById('dialog')
464
- let openbtn = document.getElementById('Advance Setting')
465
- let closebtn = document.getElementById('close')
466
- openbtn.onclick = ()=>{
467
- dialog.show()
468
- document.getElementById('imshow').style.border = '0px solid black transparent'
469
- }
470
- closebtn.onclick= ()=>{
471
- dialog.close()
472
- document.getElementById('imshow').style.background = 'linear-gradient(black, black) padding-box,linear-gradient(to right, red, blue) border-box'
473
- }
474
- let inp = document.getElementById('inp')
475
- let np = document.getElementById('np')
476
- let gd = document.getElementById('gds')
477
- let step = document.getElementById('step')
478
- let seed = document.getElementById('seed')
479
- let seedp = document.getElementById('seedp')
480
- let stepp = document.getElementById('stepp')
481
- let gdsp = document.getElementById('gdsp')
482
- let btn = document.getElementById('create')
483
- gd.addEventListener('input',()=>{
484
- gdsp.innerText = gd.value
485
- })
486
- step.addEventListener('input',()=>{
487
- stepp.innerText = step.value
488
- })
489
- seed.addEventListener('input',()=>{
490
- seedp.innerText = seed.value
491
- })
492
- isFumes = true
493
- let prompt = 'CINEMATIC'
494
- let nps = ' ,(bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3),poorly drawn,deformed hands,deformed fingers,deformed faces,deformed eyes,mutated fingers,deformedbody parts,mutated body parts,mutated hands, disfigured,oversaturated,bad anatom,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, deformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck,deformed eyes'
495
-
496
-
497
- document.getElementById('styles').onchange = ()=>{
498
- const selectedStyle = document.querySelector('input[name="style"]:checked');
499
- if(selectedStyle.value =='photo'){
500
-
501
- prompt = 'PHOTOGRAPHY'
502
-
503
-
504
- }
505
- if(selectedStyle.value == 'cinema'){
506
-
507
- prompt = "CINEMATIC"}
508
- if(selectedStyle.value == 'fantasy'){
509
-
510
- prompt = "CREATIVE"
511
- }
512
-
513
- if(selectedStyle.value == 'fumes'){
514
-
515
- prompt = 'FILM'
516
- }
517
- if(selectedStyle.value == 'no'){
518
- prompt = 'LEONARDO'
519
-
520
- }
521
- }
522
-
523
- btn.onclick = async ()=>{
524
- let isc = false
525
- let id = ''
526
-
527
-
528
-
529
-
530
-
531
- negative_prompt = nps
532
- btn.disabled = true
533
- const div = document.getElementById('imshow');
534
- div.innerHTML = '';
535
- document.getElementById('imshow').innerHTML = ''
536
- let pi = document.createElement('p')
537
- pi.innerText = 'Generating Image... Estimated Time: 20s'
538
- document.getElementById('imshow').append(pi)
539
- let count = 0;
540
- seed = seed
541
-
542
-
543
- async function generate(){
544
- cookie = localStorage.getItem("cookie")
545
- u = localStorage.getItem("u")
546
- sub = localStorage.getItem("sub")
547
- if(cookie == null){
548
- cookie = ''
549
- }
550
- if(cookie == "undefined"){
551
- cookie = ''
552
- }
553
- params={
554
-
555
- 'prompt': inp.value,
556
- 'nprompt': np.value,
557
- "steps": step.value,
558
- 'gd': gd.value,
559
- "style": prompt,
560
- "width": 1024,
561
- "height":1024,
562
- "alchemy":true,
563
- "pr":true,
564
- "cookie": cookie,
565
- "u":u,
566
- "sub":sub
567
- };
568
-
569
-
570
- try {
571
- const response = await fetch('https://l-d83c.onrender.com/leonardo', {
572
- method: 'POST',
573
- headers: {
574
- 'Content-Type': 'application/json',
575
- 'Connection': 'keep-alive',
576
- },
577
- body: JSON.stringify(params)
578
- });
579
- if (response.status === 429) {
580
- pi.innerText = 'you have reached your limit of 50 generation per hour, you will get 50 more image generaions after an hour!!'
581
- }
582
- /* console.log(np.value)
583
- const imgData = await response.text();
584
- const div = document.getElementById('imshow')
585
- const img = document.createElement('img');
586
- pi.innerHTML = ''
587
- pi.innerText = ''
588
- img.src = imgData;
589
- div.appendChild(img);
590
- */
591
-
592
- const data = await response.json();
593
- localStorage.setItem("cookie", data.token);
594
- localStorage.setItem("sub", data.sub);
595
- localStorage.setItem("u", data.u);
596
- console.log(data.result)
597
- const div = document.getElementById('imshow')
598
- const img = document.createElement('img');
599
- pi.innerHTML = ''
600
- pi.innerText = ''
601
- img.src = data.result;
602
- div.appendChild(img);
603
- btn.disabled = false
604
-
605
- } catch (error) {
606
- btn.disabled = false
607
- console.error('An error occurred:', error);
608
- pi.innerText = 'An error occurred, try changing your prompt';
609
- }
610
-
611
-
612
- }
613
-
614
- await Promise.all([generate()]);
615
-
616
-
617
-
618
-
619
- }
620
  </script>
621
 
622
 
 
1
  <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
+ <script type='text/javascript'>
5
+ window.smartlook||(function(d) {
6
+ var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
7
+ var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
8
+ c.charset='utf-8';c.src='https://web-sdk.smartlook.com/recorder.js';h.appendChild(c);
9
+ })(document);
10
+ smartlook('init', '3871167a80b985858af5636711a34302effc7033', { region: 'eu' });
11
+ </script>
12
  <meta charset="UTF-8">
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
 
458
 
459
 
460
  </div>
461
+ <script src="main.js"></script>
462
+ <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  </script>
464
 
465