Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -199,7 +199,7 @@ theme = gr.themes.Monochrome(
|
|
| 199 |
)
|
| 200 |
css = '''
|
| 201 |
#component-1{text-align:center}
|
| 202 |
-
.main_ui_logged_out{opacity: 0.
|
| 203 |
.tabitem{border: 0px}
|
| 204 |
'''
|
| 205 |
|
|
@@ -212,14 +212,15 @@ def swap_visibilty(profile: gr.OAuthProfile | None):
|
|
| 212 |
print(profile.name)
|
| 213 |
return gr.update(elem_classes=["main_ui_logged_in"])
|
| 214 |
else:
|
| 215 |
-
gr.update(elem_classes=["main_ui_logged_in"])
|
| 216 |
|
| 217 |
with gr.Blocks(theme=theme, css=css) as demo:
|
| 218 |
gr.Markdown('''# LoRA Ease for FLUX 🧞♂️
|
| 219 |
### Train a high quality FLUX LoRA in a breeze ༄ using [Ostris' AI Toolkit](https://github.com/ostris/ai-toolkit) and [AutoTrain Advanced](https://github.com/huggingface/autotrain-advanced)''')
|
| 220 |
-
|
|
|
|
| 221 |
with gr.Tab("Train on Spaces" if is_spaces else "Train locally"):
|
| 222 |
-
with gr.Column(
|
| 223 |
with gr.Row():
|
| 224 |
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")
|
| 225 |
#training_option = gr.Radio(
|
|
|
|
| 199 |
)
|
| 200 |
css = '''
|
| 201 |
#component-1{text-align:center}
|
| 202 |
+
.main_ui_logged_out{opacity: 0.3; pointer-events: none}
|
| 203 |
.tabitem{border: 0px}
|
| 204 |
'''
|
| 205 |
|
|
|
|
| 212 |
print(profile.name)
|
| 213 |
return gr.update(elem_classes=["main_ui_logged_in"])
|
| 214 |
else:
|
| 215 |
+
return gr.update(elem_classes=["main_ui_logged_in"])
|
| 216 |
|
| 217 |
with gr.Blocks(theme=theme, css=css) as demo:
|
| 218 |
gr.Markdown('''# LoRA Ease for FLUX 🧞♂️
|
| 219 |
### Train a high quality FLUX LoRA in a breeze ༄ using [Ostris' AI Toolkit](https://github.com/ostris/ai-toolkit) and [AutoTrain Advanced](https://github.com/huggingface/autotrain-advanced)''')
|
| 220 |
+
if(is_spaces):
|
| 221 |
+
gr.LoginButton("Sign in with Hugging Face to train your LoRA on Spaces", visible=is_spaces)
|
| 222 |
with gr.Tab("Train on Spaces" if is_spaces else "Train locally"):
|
| 223 |
+
with gr.Column() as main_ui:
|
| 224 |
with gr.Row():
|
| 225 |
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")
|
| 226 |
#training_option = gr.Radio(
|