openfree commited on
Commit
8d9a883
·
verified ·
1 Parent(s): b2bd854

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +54 -74
app.py CHANGED
@@ -560,103 +560,83 @@ custom_theme = gr.themes.Base(
560
  )
561
 
562
  css = '''
563
- #gen_btn{height: 100%}
 
564
  #title{text-align: center}
565
- #title h1{font-size: 3em; display:inline-flex; align-items:center}
566
- #title img{width: 100px; margin-right: 0.25em}
567
- #lora_list{background: var(--block-background-fill);padding: 0 1em .3em; font-size: 90%}
568
- .custom_lora_card{margin-bottom: 1em}
569
- .card_internal{display: flex;height: 100px;margin-top: .5em}
570
- .card_internal img{margin-right: 1em}
571
  .styler{--form-gap-width: 0px !important}
572
- #progress{height:30px}
573
  #progress .generating{display:none}
574
- .progress-container {width: 100%;height: 30px;background-color: #f0f0f0;border-radius: 15px;overflow: hidden;margin-bottom: 20px}
575
- .progress-bar {height: 100%;background-color: #4f46e5;width: calc(var(--current) / var(--total) * 100%);transition: width 0.5s ease-in-out}
576
- #component-8, .button_total{height: 100%; align-self: stretch;}
577
- #loaded_loras [data-testid="block-info"]{font-size:80%}
578
- #custom_lora_structure{background: var(--block-background-fill)}
579
- #custom_lora_btn{margin-top: auto;margin-bottom: 11px}
580
- #random_btn{font-size: 300%}
581
- #component-11{align-self: stretch;}
582
 
 
583
  #lora_gallery {
584
- margin: 20px 0;
585
- padding: 10px;
586
  border: 1px solid #ddd;
587
- border-radius: 12px;
588
  background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
589
- width: 100% !important;
590
- height: 800px !important;
591
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
592
- display: block !important;
593
- }
594
-
595
- /* 갤러리 그리드 컨테이너 */
596
- #gallery {
597
- display: grid !important;
598
- grid-template-columns: repeat(10, 1fr) !important;
599
- gap: 10px !important;
600
- padding: 10px !important;
601
- width: 100% !important;
602
- height: 100% !important;
603
- overflow-y: auto !important;
604
- max-width: 100% !important;
605
  }
606
 
607
- /* 갤러리 아이템 */
608
- .gallery-item {
609
- position: relative !important;
610
- width: 100% !important;
611
- aspect-ratio: 1 !important;
612
- margin: 0 !important;
613
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
614
- transition: transform 0.3s ease, box-shadow 0.3s ease;
615
- border-radius: 12px;
616
- overflow: hidden;
617
  }
618
 
619
- /* 갤러리 이미지 */
620
- .gallery-item img {
621
- width: 100% !important;
622
- height: 100% !important;
623
- object-fit: cover !important;
624
- border-radius: 12px !important;
625
  }
626
 
627
- /* 갤러리 그리드 래퍼 */
628
- .wrap, .svelte-w6dy5e {
629
- display: grid !important;
630
- grid-template-columns: repeat(10, 1fr) !important; /* 10개로 통일 */
631
- gap: 10px !important;
632
- width: 100% !important;
633
- max-width: 100% !important;
634
  }
635
 
636
- /* 모든 컨테이너 공통 설정 */
637
- .container, .content, .block, .contain {
638
- width: 100% !important;
639
- max-width: 100% !important;
640
- margin: 0 !important;
641
- padding: 0 !important;
642
  }
643
 
644
- /* 설정 */
645
- .row {
646
- width: 100% !important;
647
- margin: 0 !important;
648
- padding: 0 !important;
 
 
649
  }
650
 
651
- /* 입체감 있는 버튼 */
652
  .button_total {
653
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
654
- transition: all 0.3s ease;
655
  }
656
 
657
  .button_total:hover {
658
- transform: translateY(-2px);
659
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
 
 
 
 
 
660
  }
661
 
662
  /* 입체감 있는 입력 필드 */
 
560
  )
561
 
562
  css = '''
563
+ /* 기존 스타일 유지 */
564
+ #gen_btn{height: 90%} /* 100% -> 90% */
565
  #title{text-align: center}
566
+ #title h1{font-size: 2.7em; display:inline-flex; align-items:center} /* 3em -> 2.7em */
567
+ #title img{width: 90px; margin-right: 0.225em} /* 100px -> 90px, 0.25em -> 0.225em */
568
+ #lora_list{background: var(--block-background-fill);padding: 0 0.9em .27em; font-size: 81%} /* 90% 적용 */
569
+ .custom_lora_card{margin-bottom: 0.9em}
570
+ .card_internal{display: flex;height: 90px;margin-top: .45em} /* 100px -> 90px */
571
+ .card_internal img{margin-right: 0.9em}
572
  .styler{--form-gap-width: 0px !important}
573
+ #progress{height:27px} /* 30px -> 27px */
574
  #progress .generating{display:none}
575
+ .progress-container {
576
+ width: 90%; /* 100% -> 90% */
577
+ height: 27px; /* 30px -> 27px */
578
+ background-color: #f0f0f0;
579
+ border-radius: 13.5px; /* 15px -> 13.5px */
580
+ overflow: hidden;
581
+ margin-bottom: 18px /* 20px -> 18px */
582
+ }
583
 
584
+ /* 갤러리 관련 스타일 */
585
  #lora_gallery {
586
+ margin: 18px 0; /* 20px -> 18px */
587
+ padding: 9px; /* 10px -> 9px */
588
  border: 1px solid #ddd;
589
+ border-radius: 10.8px; /* 12px -> 10.8px */
590
  background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
591
+ width: 90% !important; /* 100% -> 90% */
592
+ height: 720px !important; /* 800px -> 720px */
593
+ box-shadow: 0 3.6px 5.4px -0.9px rgba(0, 0, 0, 0.1);
 
 
 
 
 
 
 
 
 
 
 
 
 
594
  }
595
 
596
+ /* 컴포넌트 크기 조정을 위한 새로운 스타일 */
597
+ .input-container {
598
+ margin: 4.5px !important; /* 5px -> 4.5px */
599
+ padding: 4.5px !important;
 
 
 
 
 
 
600
  }
601
 
602
+ .button_total {
603
+ padding: 7.2px 13.5px !important; /* 8px 15px -> 7.2px 13.5px */
604
+ font-size: 0.81em !important; /* 0.9em -> 0.81em */
 
 
 
605
  }
606
 
607
+ .slider-container {
608
+ max-width: 85.5% !important; /* 95% -> 85.5% */
 
 
 
 
 
609
  }
610
 
611
+ /* 컨테이너 여백 조정 */
612
+ .tab-content {
613
+ padding: 0 18px !important; /* 20px -> 18px */
614
+ max-width: 85.5% !important; /* 95% -> 85.5% */
615
+ margin: 0 auto !important;
 
616
  }
617
 
618
+ /* 컴포넌트들의 border-radius 조정 */
619
+ .gradio-container .input,
620
+ .gradio-container .button,
621
+ .gradio-container .block,
622
+ .gallery-item,
623
+ #lora_gallery {
624
+ border-radius: 10.8px; /* 12px -> 10.8px */
625
  }
626
 
627
+ /* 입체감 있는 버튼 효과 조정 */
628
  .button_total {
629
+ box-shadow: 0 3.6px 5.4px -0.9px rgba(0, 0, 0, 0.1), 0 1.8px 3.6px -0.9px rgba(0, 0, 0, 0.06);
 
630
  }
631
 
632
  .button_total:hover {
633
+ transform: translateY(-1.8px); /* -2px -> -1.8px */
634
+ box-shadow: 0 9px 13.5px -2.7px rgba(0, 0, 0, 0.1), 0 3.6px 5.4px -1.8px rgba(0, 0, 0, 0.05);
635
+ }
636
+
637
+ /* 스크롤바 크기 조정 */
638
+ #gallery::-webkit-scrollbar {
639
+ width: 7.2px; /* 8px -> 7.2px */
640
  }
641
 
642
  /* 입체감 있는 입력 필드 */