openfree commited on
Commit
98c36f5
·
verified ·
1 Parent(s): 45fe359

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -9
app.py CHANGED
@@ -550,24 +550,43 @@ css = '''
550
  border: 1px solid #ddd;
551
  border-radius: 8px;
552
  background: white;
 
 
553
  }
554
 
555
  #gallery {
556
- overflow-y: auto;
557
- overflow-x: hidden;
 
 
 
 
 
 
 
 
 
 
558
  }
559
 
560
  .gallery-item {
561
- width: calc(16.666% - 10px);
562
- margin: 5px;
 
563
  transition: transform 0.2s;
564
  }
565
 
 
 
 
 
 
 
566
  .gallery-item:hover {
567
  transform: scale(1.05);
 
568
  }
569
 
570
-
571
  #footer {visibility: hidden;}
572
  '''
573
 
@@ -585,8 +604,7 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
585
  3) Generate 버튼 실행
586
  """
587
  )
588
-
589
- # Gallery를 상단으로 이동
590
  with gr.Row(elem_id="lora_gallery"):
591
  gallery = gr.Gallery(
592
  [(item["image"], item["title"]) for item in loras],
@@ -594,9 +612,14 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
594
  allow_preview=False,
595
  columns=6,
596
  elem_id="gallery",
597
- height=800, # 높이를 800으로 설정
598
- object_fit="contain"
 
 
 
599
  )
 
 
600
 
601
  with gr.Tab(label="Generate"):
602
  # Prompt and Generate Button
 
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
 
 
604
  3) Generate 버튼 실행
605
  """
606
  )
607
+ # Gallery 컴포넌트 수정
 
608
  with gr.Row(elem_id="lora_gallery"):
609
  gallery = gr.Gallery(
610
  [(item["image"], item["title"]) for item in loras],
 
612
  allow_preview=False,
613
  columns=6,
614
  elem_id="gallery",
615
+ height=800,
616
+ object_fit="contain",
617
+ preview=False,
618
+ show_label=True,
619
+ elem_classes=["gallery-container"]
620
  )
621
+
622
+
623
 
624
  with gr.Tab(label="Generate"):
625
  # Prompt and Generate Button