Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -259,7 +259,8 @@ with gr.Blocks(css=css) as demo:
|
|
259 |
image = gr.Image(label="Image Reference", sources=["upload"], type="filepath")
|
260 |
|
261 |
with gr.Column():
|
262 |
-
|
|
|
263 |
gr.HTML(f'''
|
264 |
<div class="gr-prose">
|
265 |
<h2>in order to train properly your B-LoRa, you need to set space sleep time to "Don't sleep"</h2>
|
@@ -285,7 +286,7 @@ with gr.Blocks(css=css) as demo:
|
|
285 |
checkpoint_step = gr.Number(label="checkpoint step", visible=False, value=500)
|
286 |
|
287 |
|
288 |
-
if
|
289 |
train_btn = gr.Button("Train B-LoRa", visible=False)
|
290 |
else:
|
291 |
train_btn = gr.Button("Train B-LoRa", visible=True)
|
@@ -303,5 +304,5 @@ with gr.Blocks(css=css) as demo:
|
|
303 |
inputs = [image, b_lora_name, instance_prompt, class_prompt, training_type, training_steps],
|
304 |
outputs = [status]
|
305 |
)
|
306 |
-
|
307 |
demo.launch(debug=True)
|
|
|
259 |
image = gr.Image(label="Image Reference", sources=["upload"], type="filepath")
|
260 |
|
261 |
with gr.Column():
|
262 |
+
current_sleep_time = gr.Number(visible=False)
|
263 |
+
if current_sleep_time > 1:
|
264 |
gr.HTML(f'''
|
265 |
<div class="gr-prose">
|
266 |
<h2>in order to train properly your B-LoRa, you need to set space sleep time to "Don't sleep"</h2>
|
|
|
286 |
checkpoint_step = gr.Number(label="checkpoint step", visible=False, value=500)
|
287 |
|
288 |
|
289 |
+
if current_sleep_time > 1:
|
290 |
train_btn = gr.Button("Train B-LoRa", visible=False)
|
291 |
else:
|
292 |
train_btn = gr.Button("Train B-LoRa", visible=True)
|
|
|
304 |
inputs = [image, b_lora_name, instance_prompt, class_prompt, training_type, training_steps],
|
305 |
outputs = [status]
|
306 |
)
|
307 |
+
demo.load(fn=get_sleep_time, inputs=None, outputs[current_sleep_time])
|
308 |
demo.launch(debug=True)
|