Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -545,23 +545,29 @@ css = '''
|
|
545 |
#component-11{align-self: stretch;}
|
546 |
|
547 |
#lora_gallery {
|
548 |
-
margin
|
549 |
padding: 10px;
|
550 |
-
border
|
|
|
551 |
background: white;
|
552 |
}
|
553 |
|
554 |
#gallery {
|
555 |
-
|
556 |
-
overflow-x:
|
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(
|