openfree commited on
Commit
1885e7b
ยท
verified ยท
1 Parent(s): c9d1923

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -20
app.py CHANGED
@@ -550,48 +550,58 @@ css = '''
550
  border: 1px solid #ddd;
551
  border-radius: 8px;
552
  background: white;
553
- height: 800px;
554
- overflow: auto;
555
  }
556
 
557
  #gallery {
558
- height: 100% !important;
559
- overflow-y: auto !important;
560
- overflow-x: hidden !important;
561
  display: grid !important;
562
  grid-template-columns: repeat(6, 1fr) !important;
563
  gap: 10px !important;
564
  padding: 10px !important;
565
- }
566
-
567
- .gallery-container {
568
  height: 100% !important;
569
- overflow: visible !important;
570
  }
571
 
572
  .gallery-item {
573
  width: 100% !important;
574
- aspect-ratio: 1 !important;
575
  margin: 0 !important;
576
- transition: transform 0.2s;
 
577
  }
578
 
579
  .gallery-item img {
580
  width: 100% !important;
581
  height: 100% !important;
582
  object-fit: cover !important;
 
583
  }
584
 
585
  .gallery-item:hover {
586
  transform: scale(1.05);
587
  z-index: 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
588
  }
589
 
590
  #footer {visibility: hidden;}
591
  '''
592
 
593
 
594
- with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as app:
595
  loras_state = gr.State(loras)
596
  selected_indices = gr.State([])
597
 
@@ -602,21 +612,25 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
602
  ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ์›ํ•˜๋Š” ๋ชจ๋ธ์„ ์„ ํƒ(์ตœ๋Œ€ 3๊ฐœ๊นŒ์ง€) < ํ”„๋กฌํ”„ํŠธ์— ํ•œ๊ธ€ ๋˜๋Š” ์˜๋ฌธ์œผ๋กœ ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž…๋ ฅ < Generate ๋ฒ„ํŠผ ์‹คํ–‰
603
  """
604
  )
 
605
  # Gallery ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ •
606
- with gr.Row(elem_id="lora_gallery"):
607
  gallery = gr.Gallery(
608
- [(item["image"], item["title"]) for item in loras],
609
  label="LoRA Explorer Gallery",
610
- allow_preview=False,
611
  columns=6,
 
612
  elem_id="gallery",
613
  height=800,
614
- object_fit="contain",
615
- preview=False,
616
  show_label=True,
617
- elem_classes=["gallery-container"]
618
- )
619
-
 
 
 
 
620
 
621
 
622
  with gr.Tab(label="Generate"):
 
550
  border: 1px solid #ddd;
551
  border-radius: 8px;
552
  background: white;
553
+ width: 100% !important;
554
+ height: 800px !important;
555
  }
556
 
557
  #gallery {
 
 
 
558
  display: grid !important;
559
  grid-template-columns: repeat(6, 1fr) !important;
560
  gap: 10px !important;
561
  padding: 10px !important;
562
+ width: 100% !important;
 
 
563
  height: 100% !important;
564
+ overflow-y: auto !important;
565
  }
566
 
567
  .gallery-item {
568
  width: 100% !important;
569
+ height: 200px !important;
570
  margin: 0 !important;
571
+ padding: 5px !important;
572
+ box-sizing: border-box !important;
573
  }
574
 
575
  .gallery-item img {
576
  width: 100% !important;
577
  height: 100% !important;
578
  object-fit: cover !important;
579
+ border-radius: 4px !important;
580
  }
581
 
582
  .gallery-item:hover {
583
  transform: scale(1.05);
584
  z-index: 1;
585
+ transition: transform 0.2s ease;
586
+ }
587
+
588
+ /* ๊ฐค๋Ÿฌ๋ฆฌ ์ปจํ…Œ์ด๋„ˆ ๊ฐ•์ œ ๋„ˆ๋น„ ์„ค์ • */
589
+ .gradio-container {
590
+ width: 100% !important;
591
+ max-width: none !important;
592
+ }
593
+
594
+ /* ํ–‰ ๊ฐ•์ œ ๋„ˆ๋น„ ์„ค์ • */
595
+ .row {
596
+ width: 100% !important;
597
+ margin: 0 !important;
598
  }
599
 
600
  #footer {visibility: hidden;}
601
  '''
602
 
603
 
604
+ with gr.Blocks(css=css, delete_cache=(60, 3600)) as app:
605
  loras_state = gr.State(loras)
606
  selected_indices = gr.State([])
607
 
 
612
  ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ์›ํ•˜๋Š” ๋ชจ๋ธ์„ ์„ ํƒ(์ตœ๋Œ€ 3๊ฐœ๊นŒ์ง€) < ํ”„๋กฌํ”„ํŠธ์— ํ•œ๊ธ€ ๋˜๋Š” ์˜๋ฌธ์œผ๋กœ ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž…๋ ฅ < Generate ๋ฒ„ํŠผ ์‹คํ–‰
613
  """
614
  )
615
+
616
  # Gallery ์ปดํฌ๋„ŒํŠธ ์ˆ˜์ •
617
+ with gr.Row(elem_id="lora_gallery", equal_height=True):
618
  gallery = gr.Gallery(
619
+ value=[(item["image"], item["title"]) for item in loras],
620
  label="LoRA Explorer Gallery",
 
621
  columns=6,
622
+ rows=None, # ์ž๋™์œผ๋กœ ํ–‰ ์ˆ˜ ์กฐ์ •
623
  elem_id="gallery",
624
  height=800,
625
+ object_fit="cover",
 
626
  show_label=True,
627
+ allow_preview=False,
628
+ show_share_button=False,
629
+ container=True,
630
+ scale=1,
631
+ min_width=1200 # ์ตœ์†Œ ๋„ˆ๋น„ ์„ค์ •
632
+ )
633
+
634
 
635
 
636
  with gr.Tab(label="Generate"):