Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -581,6 +581,19 @@ css = '''
|
|
| 581 |
#component-11{align-self: stretch;}
|
| 582 |
|
| 583 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 584 |
/* ๊ฐค๋ฌ๋ฆฌ ๋ฉ์ธ ์ปจํ
์ด๋ */
|
| 585 |
#lora_gallery {
|
| 586 |
margin: 20px 0;
|
|
@@ -606,7 +619,6 @@ css = '''
|
|
| 606 |
max-width: 100% !important;
|
| 607 |
}
|
| 608 |
|
| 609 |
-
/* ๊ฐค๋ฌ๋ฆฌ ์์ดํ
*/
|
| 610 |
.gallery-item {
|
| 611 |
position: relative !important;
|
| 612 |
width: 100% !important;
|
|
@@ -616,10 +628,8 @@ css = '''
|
|
| 616 |
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 617 |
border-radius: 12px;
|
| 618 |
overflow: hidden;
|
| 619 |
-
flex: 1 1 calc(16.666% - 15px) !important;
|
| 620 |
}
|
| 621 |
|
| 622 |
-
/* ๊ฐค๋ฌ๋ฆฌ ์ด๋ฏธ์ง */
|
| 623 |
.gallery-item img {
|
| 624 |
width: 100% !important;
|
| 625 |
height: 100% !important;
|
|
@@ -627,43 +637,35 @@ css = '''
|
|
| 627 |
border-radius: 12px !important;
|
| 628 |
}
|
| 629 |
|
| 630 |
-
/* ๊ฐค๋ฌ๋ฆฌ ๊ทธ๋ฆฌ๋ ๋ํผ */
|
| 631 |
-
.
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
display: block !important;
|
| 636 |
-
}
|
| 637 |
-
|
| 638 |
-
/* Gradio ์ปจํ
์ด๋ ์์ */
|
| 639 |
-
.gradio-container {
|
| 640 |
-
width: 100% !important;
|
| 641 |
-
max-width: none !important;
|
| 642 |
-
}
|
| 643 |
-
|
| 644 |
-
.gradio-container .contain {
|
| 645 |
width: 100% !important;
|
| 646 |
-
max-width: 100% !important;
|
| 647 |
-
display: block !important;
|
| 648 |
}
|
| 649 |
|
| 650 |
-
/*
|
| 651 |
-
.
|
| 652 |
width: 100% !important;
|
| 653 |
max-width: 100% !important;
|
| 654 |
}
|
| 655 |
|
| 656 |
-
/*
|
| 657 |
-
.
|
| 658 |
width: 100% !important;
|
| 659 |
-
|
| 660 |
-
|
| 661 |
}
|
| 662 |
|
| 663 |
-
/*
|
| 664 |
-
.
|
|
|
|
|
|
|
|
|
|
| 665 |
width: 100% !important;
|
| 666 |
-
|
|
|
|
| 667 |
}
|
| 668 |
|
| 669 |
/* ํ ์ค์ */
|
|
@@ -734,22 +736,27 @@ with gr.Blocks(theme=custom_theme, css=css, delete_cache=(60, 3600)) as app:
|
|
| 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=
|
| 744 |
object_fit="cover",
|
| 745 |
show_label=True,
|
| 746 |
allow_preview=False,
|
| 747 |
show_share_button=False,
|
| 748 |
-
scale=1,
|
| 749 |
-
min_width="100%", # ์์
|
| 750 |
container=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 751 |
preview=False
|
| 752 |
-
)
|
|
|
|
| 753 |
|
| 754 |
|
| 755 |
with gr.Tab(label="Generate"):
|
|
|
|
| 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;
|
|
|
|
| 619 |
max-width: 100% !important;
|
| 620 |
}
|
| 621 |
|
|
|
|
| 622 |
.gallery-item {
|
| 623 |
position: relative !important;
|
| 624 |
width: 100% !important;
|
|
|
|
| 628 |
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
| 629 |
border-radius: 12px;
|
| 630 |
overflow: hidden;
|
|
|
|
| 631 |
}
|
| 632 |
|
|
|
|
| 633 |
.gallery-item img {
|
| 634 |
width: 100% !important;
|
| 635 |
height: 100% !important;
|
|
|
|
| 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 |
/* ํ ์ค์ */
|
|
|
|
| 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 |
|
| 762 |
with gr.Tab(label="Generate"):
|