fffiloni commited on
Commit
33cad16
β€’
1 Parent(s): db2a4a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -172,7 +172,7 @@ with gr.Blocks(css=css) as demo:
172
  with gr.Column(elem_id="col-container"):
173
  if is_shared_ui:
174
  top_description = gr.HTML(f'''
175
- <div class="gr-prose" style="max-width: 80%">
176
  <h2>Attention - This Space doesn't work in this shared UI</h2>
177
  <p>For it to work, you can duplicate the Space and run it on your own profile using a (paid) private T4-small or A10G-small GPU for training. A T4 costs US$0.60/h, so it should cost < US$1 to train most models using default settings with it!&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>
178
  </div>
@@ -180,14 +180,14 @@ with gr.Blocks(css=css) as demo:
180
  else:
181
  if(is_gpu_associated):
182
  top_description = gr.HTML(f'''
183
- <div class="gr-prose" style="max-width: 80%">
184
  <h2>You have successfully associated a {which_gpu} GPU to the SD-XL Dreambooth LoRa Training Space πŸŽ‰</h2>
185
  <p>You can now train your model! You will be billed by the minute from when you activated the GPU until when it is turned it off.</p>
186
  </div>
187
  ''')
188
  else:
189
  top_description = gr.HTML(f'''
190
- <div class="gr-prose" style="max-width: 80%">
191
  <h2>You have successfully duplicated the SD-XL Dreambooth LoRa Training Space πŸŽ‰</h2>
192
  <p>There's only one step left before you can train your model: <a href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}/settings" style="text-decoration: underline" target="_blank">attribute a <b>T4-small or A10G-small GPU</b> to it (via the Settings tab)</a> and run the training below. You will be billed by the minute from when you activate the GPU until when it is turned it off.</p>
193
  </div>
@@ -201,7 +201,7 @@ with gr.Blocks(css=css) as demo:
201
  model_output_folder = gr.Textbox(label="Output model folder name", placeholder="lora-trained-xl-folder")
202
  max_train_steps = gr.Number(label="Max Training Steps", value=500, precision=0, step=10)
203
  checkpoint_steps = gr.Number(label="Checkpoints Steps", value=100, precision=0, step=10)
204
- remove_gpu = gr.Checkbox(label="Remove GPU After Training", value=True)
205
  train_button = gr.Button("Train !")
206
 
207
 
 
172
  with gr.Column(elem_id="col-container"):
173
  if is_shared_ui:
174
  top_description = gr.HTML(f'''
175
+ <div class="gr-prose">
176
  <h2>Attention - This Space doesn't work in this shared UI</h2>
177
  <p>For it to work, you can duplicate the Space and run it on your own profile using a (paid) private T4-small or A10G-small GPU for training. A T4 costs US$0.60/h, so it should cost < US$1 to train most models using default settings with it!&nbsp;&nbsp;<a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></p>
178
  </div>
 
180
  else:
181
  if(is_gpu_associated):
182
  top_description = gr.HTML(f'''
183
+ <div class="gr-prose">
184
  <h2>You have successfully associated a {which_gpu} GPU to the SD-XL Dreambooth LoRa Training Space πŸŽ‰</h2>
185
  <p>You can now train your model! You will be billed by the minute from when you activated the GPU until when it is turned it off.</p>
186
  </div>
187
  ''')
188
  else:
189
  top_description = gr.HTML(f'''
190
+ <div class="gr-prose">
191
  <h2>You have successfully duplicated the SD-XL Dreambooth LoRa Training Space πŸŽ‰</h2>
192
  <p>There's only one step left before you can train your model: <a href="https://huggingface.co/spaces/{os.environ['SPACE_ID']}/settings" style="text-decoration: underline" target="_blank">attribute a <b>T4-small or A10G-small GPU</b> to it (via the Settings tab)</a> and run the training below. You will be billed by the minute from when you activate the GPU until when it is turned it off.</p>
193
  </div>
 
201
  model_output_folder = gr.Textbox(label="Output model folder name", placeholder="lora-trained-xl-folder")
202
  max_train_steps = gr.Number(label="Max Training Steps", value=500, precision=0, step=10)
203
  checkpoint_steps = gr.Number(label="Checkpoints Steps", value=100, precision=0, step=10)
204
+ remove_gpu = gr.Checkbox(label="Remove GPU After Training", value=True)
205
  train_button = gr.Button("Train !")
206
 
207