Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
93f1414
1
Parent(s):
bc2c5d3
Update app.py
Browse files
app.py
CHANGED
@@ -247,7 +247,7 @@ def update_pricing(steps):
|
|
247 |
cost = round(cost_per_second * total_seconds, 2)
|
248 |
cost_preview = f'''To train this LoRA, a paid L4 GPU will be hooked under the hood during training and then removed once finished.
|
249 |
## Estimated to cost <b>< US$ {str(cost)}</b> for {round(int(total_seconds)/60, 2)} minutes with your current train settings <small>({int(steps)} iterations at {seconds_per_iteration}s/it)</small>'''
|
250 |
-
return gr.update(visible=True),
|
251 |
|
252 |
with gr.Blocks(theme=theme, css=css) as demo:
|
253 |
gr.Markdown(
|
@@ -388,6 +388,12 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
388 |
outputs=[cost_preview, cost_preview_info]
|
389 |
)
|
390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
start.click(fn=create_dataset, inputs=[images] + caption_list, outputs=dataset_folder).then(
|
392 |
fn=start_training,
|
393 |
inputs=[
|
|
|
247 |
cost = round(cost_per_second * total_seconds, 2)
|
248 |
cost_preview = f'''To train this LoRA, a paid L4 GPU will be hooked under the hood during training and then removed once finished.
|
249 |
## Estimated to cost <b>< US$ {str(cost)}</b> for {round(int(total_seconds)/60, 2)} minutes with your current train settings <small>({int(steps)} iterations at {seconds_per_iteration}s/it)</small>'''
|
250 |
+
return gr.update(visible=True), cost_preview
|
251 |
|
252 |
with gr.Blocks(theme=theme, css=css) as demo:
|
253 |
gr.Markdown(
|
|
|
388 |
outputs=[cost_preview, cost_preview_info]
|
389 |
)
|
390 |
|
391 |
+
steps.change(
|
392 |
+
update_pricing,
|
393 |
+
inputs=[steps],
|
394 |
+
outputs=[cost_preview, cost_preview_info]
|
395 |
+
)
|
396 |
+
|
397 |
start.click(fn=create_dataset, inputs=[images] + caption_list, outputs=dataset_folder).then(
|
398 |
fn=start_training,
|
399 |
inputs=[
|