openfree commited on
Commit
4140768
ยท
verified ยท
1 Parent(s): 13f2a5f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -34
app.py CHANGED
@@ -581,6 +581,19 @@ css = '''
581
  #component-11{align-self: stretch;}
582
 
583
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584
  /* ๊ฐค๋Ÿฌ๋ฆฌ ๋ฉ”์ธ ์ปจํ…Œ์ด๋„ˆ */
585
  #lora_gallery {
586
  margin: 20px 0;
@@ -606,7 +619,6 @@ css = '''
606
  max-width: 100% !important;
607
  }
608
 
609
- /* ๊ฐค๋Ÿฌ๋ฆฌ ์•„์ดํ…œ */
610
  .gallery-item {
611
  position: relative !important;
612
  width: 100% !important;
@@ -616,10 +628,8 @@ css = '''
616
  transition: transform 0.3s ease, box-shadow 0.3s ease;
617
  border-radius: 12px;
618
  overflow: hidden;
619
- flex: 1 1 calc(16.666% - 15px) !important;
620
  }
621
 
622
- /* ๊ฐค๋Ÿฌ๋ฆฌ ์ด๋ฏธ์ง€ */
623
  .gallery-item img {
624
  width: 100% !important;
625
  height: 100% !important;
@@ -627,43 +637,35 @@ css = '''
627
  border-radius: 12px !important;
628
  }
629
 
630
- /* ๊ฐค๋Ÿฌ๋ฆฌ ๊ทธ๋ฆฌ๋“œ ๋ž˜ํผ */
631
- .grid-wrap, .grid-container {
632
- width: 100% !important;
633
- max-width: 100% !important;
634
- margin: 0 !important;
635
- display: block !important;
636
- }
637
-
638
- /* Gradio ์ปจํ…Œ์ด๋„ˆ ์ˆ˜์ • */
639
- .gradio-container {
640
- width: 100% !important;
641
- max-width: none !important;
642
- }
643
-
644
- .gradio-container .contain {
645
  width: 100% !important;
646
- max-width: 100% !important;
647
- display: block !important;
648
  }
649
 
650
- /* ํ–‰ ์ปจํ…Œ์ด๋„ˆ ์ˆ˜์ • */
651
- .row > * {
652
  width: 100% !important;
653
  max-width: 100% !important;
654
  }
655
 
656
- /* ๊ฐค๋Ÿฌ๋ฆฌ ์ปจํ…Œ์ด๋„ˆ ๊ฐ•์ œ ์„ค์ • */
657
- .gallery-container {
658
  width: 100% !important;
659
- max-width: 100% !important;
660
- display: block !important;
661
  }
662
 
663
- /* ๊ฐค๋Ÿฌ๋ฆฌ ์•„์ดํ…œ ์ปจํ…Œ์ด๋„ˆ */
664
- .gallery-item-container {
 
 
 
665
  width: 100% !important;
666
- display: contents !important;
 
667
  }
668
 
669
  /* ํ–‰ ์„ค์ • */
@@ -734,22 +736,27 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
734
  ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ์›ํ•˜๋Š” ๋ชจ๋ธ์„ ์„ ํƒ(์ตœ๋Œ€ 3๊ฐœ๊นŒ์ง€) < ํ”„๋กฌํ”„ํŠธ์— ํ•œ๊ธ€ ๋˜๋Š” ์˜๋ฌธ์œผ๋กœ ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž…๋ ฅ < Generate ๋ฒ„ํŠผ ์‹คํ–‰
735
  """
736
  )
 
737
  with gr.Row(elem_id="lora_gallery", equal_height=True):
738
  gallery = gr.Gallery(
739
  value=[(item["image"], item["title"]) for item in loras],
740
  label="LoRA Explorer Gallery",
741
- columns=6,
 
742
  elem_id="gallery",
743
- height="800px",
744
  object_fit="cover",
745
  show_label=True,
746
  allow_preview=False,
747
  show_share_button=False,
748
- scale=1,
749
- min_width="100%", # ์ˆ˜์ •
750
  container=True,
 
 
 
 
751
  preview=False
752
- )
 
753
 
754
 
755
  with gr.Tab(label="Generate"):
 
581
  #component-11{align-self: stretch;}
582
 
583
 
584
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ๋ฉ”์ธ ์ปจํ…Œ์ด๋„ˆ */
585
+ #lora_gallery {
586
+ margin: 20px 0;
587
+ padding: 10px;
588
+ border: 1px solid #ddd;
589
+ border-radius: 12px;
590
+ background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
591
+ width: 100% !important;
592
+ height: 800px !important;
593
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
594
+ display: block !important;
595
+ }
596
+
597
  /* ๊ฐค๋Ÿฌ๋ฆฌ ๋ฉ”์ธ ์ปจํ…Œ์ด๋„ˆ */
598
  #lora_gallery {
599
  margin: 20px 0;
 
619
  max-width: 100% !important;
620
  }
621
 
 
622
  .gallery-item {
623
  position: relative !important;
624
  width: 100% !important;
 
628
  transition: transform 0.3s ease, box-shadow 0.3s ease;
629
  border-radius: 12px;
630
  overflow: hidden;
 
631
  }
632
 
 
633
  .gallery-item img {
634
  width: 100% !important;
635
  height: 100% !important;
 
637
  border-radius: 12px !important;
638
  }
639
 
640
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ๊ทธ๋ฆฌ๋“œ ๋ž˜ํผ ์ˆ˜์ • */
641
+ .wrap.svelte-w6dy5e {
642
+ display: grid !important;
643
+ grid-template-columns: repeat(6, 1fr) !important;
644
+ gap: 15px !important;
 
 
 
 
 
 
 
 
 
 
645
  width: 100% !important;
 
 
646
  }
647
 
648
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ์ปจํ…Œ์ด๋„ˆ ๊ฐ•์ œ ์„ค์ • */
649
+ .container, .content {
650
  width: 100% !important;
651
  max-width: 100% !important;
652
  }
653
 
654
+ /* ์ด๋ฏธ์ง€ ์ปจํ…Œ์ด๋„ˆ ์„ค์ • */
655
+ .image-container {
656
  width: 100% !important;
657
+ padding-bottom: 100% !important;
658
+ position: relative !important;
659
  }
660
 
661
+ /* ์ด๋ฏธ์ง€ ์„ค์ • */
662
+ .image-container img {
663
+ position: absolute !important;
664
+ top: 0 !important;
665
+ left: 0 !important;
666
  width: 100% !important;
667
+ height: 100% !important;
668
+ object-fit: cover !important;
669
  }
670
 
671
  /* ํ–‰ ์„ค์ • */
 
736
  ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ์›ํ•˜๋Š” ๋ชจ๋ธ์„ ์„ ํƒ(์ตœ๋Œ€ 3๊ฐœ๊นŒ์ง€) < ํ”„๋กฌํ”„ํŠธ์— ํ•œ๊ธ€ ๋˜๋Š” ์˜๋ฌธ์œผ๋กœ ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž…๋ ฅ < Generate ๋ฒ„ํŠผ ์‹คํ–‰
737
  """
738
  )
739
+
740
  with gr.Row(elem_id="lora_gallery", equal_height=True):
741
  gallery = gr.Gallery(
742
  value=[(item["image"], item["title"]) for item in loras],
743
  label="LoRA Explorer Gallery",
744
+ columns=[6], # ์ˆ˜์ •
745
+ rows=None,
746
  elem_id="gallery",
747
+ height=800,
748
  object_fit="cover",
749
  show_label=True,
750
  allow_preview=False,
751
  show_share_button=False,
 
 
752
  container=True,
753
+ scale=1,
754
+ min_width=1200,
755
+ visible=True,
756
+ show_download_button=False,
757
  preview=False
758
+ )
759
+
760
 
761
 
762
  with gr.Tab(label="Generate"):