openfree commited on
Commit
9f6aa5f
ยท
verified ยท
1 Parent(s): 4140768

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -44
app.py CHANGED
@@ -580,20 +580,6 @@ css = '''
580
  #random_btn{font-size: 300%}
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;
@@ -601,10 +587,12 @@ css = '''
601
  border: 1px solid #ddd;
602
  border-radius: 12px;
603
  background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
604
- width: 100% !important;
 
605
  height: 800px !important;
606
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
607
  display: block !important;
 
608
  }
609
 
610
  /* ๊ฐค๋Ÿฌ๋ฆฌ ๊ทธ๋ฆฌ๋“œ ์ปจํ…Œ์ด๋„ˆ */
@@ -619,6 +607,7 @@ css = '''
619
  max-width: 100% !important;
620
  }
621
 
 
622
  .gallery-item {
623
  position: relative !important;
624
  width: 100% !important;
@@ -630,6 +619,7 @@ css = '''
630
  overflow: hidden;
631
  }
632
 
 
633
  .gallery-item img {
634
  width: 100% !important;
635
  height: 100% !important;
@@ -637,41 +627,36 @@ css = '''
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
  /* ํ–‰ ์„ค์ • */
672
  .row {
673
  width: 100% !important;
674
  margin: 0 !important;
 
675
  }
676
 
677
  /* ์ž…์ฒด๊ฐ ์žˆ๋Š” ๋ฒ„ํŠผ */
@@ -721,6 +706,19 @@ input:focus, textarea:focus {
721
  background: #555;
722
  }
723
 
 
 
 
 
 
 
 
 
 
 
 
 
 
724
  #footer {visibility: hidden;}
725
  '''
726
 
@@ -736,26 +734,22 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
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
 
 
580
  #random_btn{font-size: 300%}
581
  #component-11{align-self: stretch;}
582
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
583
  /* ๊ฐค๋Ÿฌ๋ฆฌ ๋ฉ”์ธ ์ปจํ…Œ์ด๋„ˆ */
584
  #lora_gallery {
585
  margin: 20px 0;
 
587
  border: 1px solid #ddd;
588
  border-radius: 12px;
589
  background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
590
+ width: 100vw !important;
591
+ max-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
+ overflow: hidden;
596
  }
597
 
598
  /* ๊ฐค๋Ÿฌ๋ฆฌ ๊ทธ๋ฆฌ๋“œ ์ปจํ…Œ์ด๋„ˆ */
 
607
  max-width: 100% !important;
608
  }
609
 
610
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ์•„์ดํ…œ */
611
  .gallery-item {
612
  position: relative !important;
613
  width: 100% !important;
 
619
  overflow: hidden;
620
  }
621
 
622
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ์ด๋ฏธ์ง€ */
623
  .gallery-item img {
624
  width: 100% !important;
625
  height: 100% !important;
 
627
  border-radius: 12px !important;
628
  }
629
 
630
+ /* Gradio ์ปจํ…Œ์ด๋„ˆ ์„ค์ • */
631
+ .gradio-container {
 
 
 
 
 
 
 
 
632
  width: 100% !important;
633
  max-width: 100% !important;
634
+ margin: 0 !important;
635
+ padding: 0 !important;
636
  }
637
 
638
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ๊ทธ๋ฆฌ๋“œ ๋ž˜ํผ */
639
+ .wrap, .svelte-w6dy5e {
640
+ display: grid !important;
641
+ grid-template-columns: repeat(6, 1fr) !important;
642
+ gap: 15px !important;
643
  width: 100% !important;
644
+ max-width: 100% !important;
 
645
  }
646
 
647
+ /* ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ ๊ณตํ†ต ์„ค์ • */
648
+ .container, .content, .block, .contain {
 
 
 
649
  width: 100% !important;
650
+ max-width: 100% !important;
651
+ margin: 0 !important;
652
+ padding: 0 !important;
653
  }
654
 
655
  /* ํ–‰ ์„ค์ • */
656
  .row {
657
  width: 100% !important;
658
  margin: 0 !important;
659
+ padding: 0 !important;
660
  }
661
 
662
  /* ์ž…์ฒด๊ฐ ์žˆ๋Š” ๋ฒ„ํŠผ */
 
706
  background: #555;
707
  }
708
 
709
+ /* ๊ฐค๋Ÿฌ๋ฆฌ flex ์ปจํ…Œ์ด๋„ˆ */
710
+ .flex {
711
+ width: 100% !important;
712
+ max-width: 100% !important;
713
+ display: flex !important;
714
+ }
715
+
716
+ /* svelte ํŠน์ • ํด๋ž˜์Šค */
717
+ .svelte-1p9xokt {
718
+ width: 100% !important;
719
+ max-width: 100% !important;
720
+ }
721
+
722
  #footer {visibility: hidden;}
723
  '''
724
 
 
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=800,
744
  object_fit="cover",
745
  show_label=True,
746
  allow_preview=False,
747
  show_share_button=False,
748
+ scale=None, # scale ์ œ๊ฑฐ
749
  container=True,
 
 
 
 
750
  preview=False
751
+ ).style(full_width=True) # ์ „์ฒด ๋„ˆ๋น„ ์‚ฌ์šฉ
752
+
753
 
754
 
755