openfree commited on
Commit
45fe359
ยท
verified ยท
1 Parent(s): c903e5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -21
app.py CHANGED
@@ -545,23 +545,29 @@ css = '''
545
  #component-11{align-self: stretch;}
546
 
547
  #lora_gallery {
548
- margin-top: 20px;
549
  padding: 10px;
550
- border-top: 1px solid #ddd;
 
551
  background: white;
552
  }
553
 
554
  #gallery {
555
- min-height: 200px;
556
- overflow-x: auto;
557
- overflow-y: hidden;
558
  }
559
 
560
  .gallery-item {
561
  width: calc(16.666% - 10px);
562
  margin: 5px;
 
563
  }
564
 
 
 
 
 
 
565
  #footer {visibility: hidden;}
566
  '''
567
 
@@ -573,16 +579,25 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
573
  gr.Markdown(
574
  """
575
  # MixGen3: ๋ฉ€ํ‹ฐ Lora(์ด๋ฏธ์ง€ ํ•™์Šต) ํ†ตํ•ฉ ์ƒ์„ฑ ๋ชจ๋ธ
576
-
577
  ### ์‚ฌ์šฉ ์•ˆ๋‚ด:
578
  1) ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ์›ํ•˜๋Š” ๋ชจ๋ธ์„ ์„ ํƒ(์ตœ๋Œ€ 3๊ฐœ๊นŒ์ง€)
579
  2) ํ”„๋กฌํ”„ํŠธ์— ํ•œ๊ธ€ ๋˜๋Š” ์˜๋ฌธ์œผ๋กœ ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž…๋ ฅ
580
- 3) Generate ๋ฒ„ํŠผ ์‹คํ–‰
581
-
582
- ### Contacts: [email protected]
583
  """
584
  )
585
-
 
 
 
 
 
 
 
 
 
 
 
 
586
  with gr.Tab(label="Generate"):
587
  # Prompt and Generate Button
588
  with gr.Row():
@@ -666,17 +681,6 @@ with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as a
666
  remove_custom_lora_button = gr.Button("Remove Custom LoRA", visible=False)
667
  gr.Markdown("[Check the list of FLUX LoRAs](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.1-dev)", elem_id="lora_list")
668
 
669
- # Gallery
670
- with gr.Row(elem_id="lora_gallery"):
671
- gallery = gr.Gallery(
672
- [(item["image"], item["title"]) for item in loras],
673
- label="LoRA Explorer Gallery",
674
- allow_preview=False,
675
- columns=6,
676
- elem_id="gallery",
677
- height="auto",
678
- object_fit="contain"
679
- )
680
 
681
  # Event Handlers
682
  gallery.select(
 
545
  #component-11{align-self: stretch;}
546
 
547
  #lora_gallery {
548
+ margin: 20px 0;
549
  padding: 10px;
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
 
 
579
  gr.Markdown(
580
  """
581
  # MixGen3: ๋ฉ€ํ‹ฐ Lora(์ด๋ฏธ์ง€ ํ•™์Šต) ํ†ตํ•ฉ ์ƒ์„ฑ ๋ชจ๋ธ
 
582
  ### ์‚ฌ์šฉ ์•ˆ๋‚ด:
583
  1) ๊ฐค๋Ÿฌ๋ฆฌ์—์„œ ์›ํ•˜๋Š” ๋ชจ๋ธ์„ ์„ ํƒ(์ตœ๋Œ€ 3๊ฐœ๊นŒ์ง€)
584
  2) ํ”„๋กฌํ”„ํŠธ์— ํ•œ๊ธ€ ๋˜๋Š” ์˜๋ฌธ์œผ๋กœ ์›ํ•˜๋Š” ๋‚ด์šฉ์„ ์ž…๋ ฅ
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],
593
+ label="LoRA Explorer Gallery",
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
603
  with gr.Row():
 
681
  remove_custom_lora_button = gr.Button("Remove Custom LoRA", visible=False)
682
  gr.Markdown("[Check the list of FLUX LoRAs](https://huggingface.co/models?other=base_model:adapter:black-forest-labs/FLUX.1-dev)", elem_id="lora_list")
683
 
 
 
 
 
 
 
 
 
 
 
 
684
 
685
  # Event Handlers
686
  gallery.select(