Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import subprocess
|
|
| 5 |
from subprocess import getoutput
|
| 6 |
from huggingface_hub import snapshot_download
|
| 7 |
|
| 8 |
-
hf_token = os.environ.get("
|
| 9 |
|
| 10 |
is_shared_ui = True if "fffiloni/train-dreambooth-lora-sdxl" in os.environ['SPACE_ID'] else False
|
| 11 |
|
|
@@ -123,8 +123,11 @@ def main(dataset_id,
|
|
| 123 |
|
| 124 |
return f"Done, your trained model has been stored in your models library: your_user_name/{lora-trained-xl-folder}"
|
| 125 |
|
| 126 |
-
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
| 128 |
if is_shared_ui:
|
| 129 |
top_description = gr.HTML(f'''
|
| 130 |
<div class="gr-prose" style="max-width: 80%">
|
|
|
|
| 5 |
from subprocess import getoutput
|
| 6 |
from huggingface_hub import snapshot_download
|
| 7 |
|
| 8 |
+
hf_token = os.environ.get("HF_TOKEN_WITH_WRITE_PERMISSION")
|
| 9 |
|
| 10 |
is_shared_ui = True if "fffiloni/train-dreambooth-lora-sdxl" in os.environ['SPACE_ID'] else False
|
| 11 |
|
|
|
|
| 123 |
|
| 124 |
return f"Done, your trained model has been stored in your models library: your_user_name/{lora-trained-xl-folder}"
|
| 125 |
|
| 126 |
+
css="""
|
| 127 |
+
#col-container {max-width: 780px; margin-left: auto; margin-right: auto;}
|
| 128 |
+
"""
|
| 129 |
+
with gr.Blocks(css=css) as demo:
|
| 130 |
+
with gr.Column(elem_id="col-container"):
|
| 131 |
if is_shared_ui:
|
| 132 |
top_description = gr.HTML(f'''
|
| 133 |
<div class="gr-prose" style="max-width: 80%">
|