Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
6313efa
1
Parent(s):
9bdd321
Update app.py
Browse files
app.py
CHANGED
@@ -512,6 +512,9 @@ css = '''.gr-group{background-color: transparent;box-shadow: var(--block-shadow)
|
|
512 |
#training_cost small{font-weight: normal}
|
513 |
.accordion {color: var(--body-text-color)}
|
514 |
.main_unlogged{opacity: 0.5;pointer-events: none}
|
|
|
|
|
|
|
515 |
'''
|
516 |
theme = gr.themes.Monochrome(
|
517 |
text_size=gr.themes.Size(lg="18px", md="15px", sm="13px", xl="22px", xs="12px", xxl="24px", xxs="9px"),
|
@@ -519,7 +522,7 @@ theme = gr.themes.Monochrome(
|
|
519 |
)
|
520 |
def swap_opacity(token: gr.OAuthToken | None):
|
521 |
if token is None:
|
522 |
-
return gr.update(elem_classes=["main_unlogged"])
|
523 |
else:
|
524 |
return gr.update(elem_classes=["main_logged"])
|
525 |
with gr.Blocks(css=css, theme=theme) as demo:
|
@@ -527,7 +530,7 @@ with gr.Blocks(css=css, theme=theme) as demo:
|
|
527 |
gr.Markdown('''# LoRA Ease 🧞♂️
|
528 |
### Train a high quality SDXL LoRA in a breeze ༄ with state-of-the-art techniques
|
529 |
<small>Dreambooth with Pivotal Tuning, Prodigy and more! Use the trained LoRAs with diffusers, AUTO1111, Comfy. [blog about the training script](#), [Colab Pro](#), [run locally or in a cloud](#)</small>''', elem_id="main_title")
|
530 |
-
gr.LoginButton()
|
531 |
with gr.Column(elem_classes=["main_unlogged"]) as main_ui:
|
532 |
lora_name = gr.Textbox(label="The name of your LoRA", info="This has to be a unique name", placeholder="e.g.: Persian Miniature Painting style, Cat Toy")
|
533 |
training_option = gr.Radio(
|
@@ -843,7 +846,7 @@ with gr.Blocks(css=css, theme=theme) as demo:
|
|
843 |
start = gr.Button("Start training", visible=False, interactive=True)
|
844 |
progress_area = gr.Markdown("")
|
845 |
|
846 |
-
gr.LogoutButton()
|
847 |
output_components.insert(1, advanced)
|
848 |
output_components.insert(1, cost_estimation)
|
849 |
gr.on(
|
|
|
512 |
#training_cost small{font-weight: normal}
|
513 |
.accordion {color: var(--body-text-color)}
|
514 |
.main_unlogged{opacity: 0.5;pointer-events: none}
|
515 |
+
.login_logout{width: 100%}
|
516 |
+
#login {font-size: 0px;width: 100% !important;margin: 0 auto}
|
517 |
+
#login:after {content: 'Authorize this app to train your model';visibility: visible;display: block;font-size: var(--button-large-text-size)}
|
518 |
'''
|
519 |
theme = gr.themes.Monochrome(
|
520 |
text_size=gr.themes.Size(lg="18px", md="15px", sm="13px", xl="22px", xs="12px", xxl="24px", xxs="9px"),
|
|
|
522 |
)
|
523 |
def swap_opacity(token: gr.OAuthToken | None):
|
524 |
if token is None:
|
525 |
+
return gr.update(elem_classes=["main_unlogged"], elem_id="login")
|
526 |
else:
|
527 |
return gr.update(elem_classes=["main_logged"])
|
528 |
with gr.Blocks(css=css, theme=theme) as demo:
|
|
|
530 |
gr.Markdown('''# LoRA Ease 🧞♂️
|
531 |
### Train a high quality SDXL LoRA in a breeze ༄ with state-of-the-art techniques
|
532 |
<small>Dreambooth with Pivotal Tuning, Prodigy and more! Use the trained LoRAs with diffusers, AUTO1111, Comfy. [blog about the training script](#), [Colab Pro](#), [run locally or in a cloud](#)</small>''', elem_id="main_title")
|
533 |
+
gr.LoginButton(elem_classes=["login_logout"])
|
534 |
with gr.Column(elem_classes=["main_unlogged"]) as main_ui:
|
535 |
lora_name = gr.Textbox(label="The name of your LoRA", info="This has to be a unique name", placeholder="e.g.: Persian Miniature Painting style, Cat Toy")
|
536 |
training_option = gr.Radio(
|
|
|
846 |
start = gr.Button("Start training", visible=False, interactive=True)
|
847 |
progress_area = gr.Markdown("")
|
848 |
|
849 |
+
gr.LogoutButton(elem_classes=["login_logout"])
|
850 |
output_components.insert(1, advanced)
|
851 |
output_components.insert(1, cost_estimation)
|
852 |
gr.on(
|