Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -550,48 +550,58 @@ css = '''
|
|
| 550 |
border: 1px solid #ddd;
|
| 551 |
border-radius: 8px;
|
| 552 |
background: white;
|
| 553 |
-
|
| 554 |
-
|
| 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:
|
| 570 |
}
|
| 571 |
|
| 572 |
.gallery-item {
|
| 573 |
width: 100% !important;
|
| 574 |
-
|
| 575 |
margin: 0 !important;
|
| 576 |
-
|
|
|
|
| 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(
|
| 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="
|
| 615 |
-
preview=False,
|
| 616 |
show_label=True,
|
| 617 |
-
|
| 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"):
|