fffiloni commited on
Commit
147f7a8
·
verified ·
1 Parent(s): 18ae9a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -10
app.py CHANGED
@@ -271,8 +271,13 @@ with gr.Blocks(css=css) as demo:
271
  with gr.Column():
272
 
273
  with gr.Row():
274
- current_sleep_time = gr.Textbox(label="current space sleep time")
275
- check_sleep_time_btn = gr.Button("check", scale=1)
 
 
 
 
 
276
  training_type = gr.Radio(label="Training type", choices=["style", "concept"], value="style", visible=False)
277
  b_lora_name = gr.Textbox(label="Name your B-LoRa model", placeholder="b_lora_trained_folder", visible=False)
278
  with gr.Row():
@@ -287,10 +292,10 @@ with gr.Blocks(css=css) as demo:
287
 
288
  status = gr.Textbox(label="status")
289
 
290
- check_sleep_time_btn.click(
291
- fn = check_sleep_time,
292
- inputs = None,
293
- outputs = [current_sleep_time, b_lora_name, instance_prompt, class_prompt, training_type, training_steps, train_btn]
294
  )
295
 
296
  demo.load(
@@ -300,10 +305,10 @@ with gr.Blocks(css=css) as demo:
300
  )
301
 
302
  training_type.change(
303
- fn = change_training_setup,
304
- inputs = [training_type],
305
- outputs = [training_steps, checkpoint_step]
306
- )
307
 
308
  train_btn.click(
309
  fn = main,
 
271
  with gr.Column():
272
 
273
  with gr.Row():
274
+ current_sleep_time = gr.Dropdown(
275
+ label="current space sleep time",
276
+ choices = [
277
+ -1, 300, 900, 1800, 3600, 36000, 86400, 172800, 259200, 604800
278
+ ]
279
+ )
280
+ #check_sleep_time_btn = gr.Button("check", scale=1)
281
  training_type = gr.Radio(label="Training type", choices=["style", "concept"], value="style", visible=False)
282
  b_lora_name = gr.Textbox(label="Name your B-LoRa model", placeholder="b_lora_trained_folder", visible=False)
283
  with gr.Row():
 
292
 
293
  status = gr.Textbox(label="status")
294
 
295
+ current_sleep_time.change(
296
+ fn = swap_sleep_time,
297
+ inputs = current_sleep_time,
298
+ outputs = None
299
  )
300
 
301
  demo.load(
 
305
  )
306
 
307
  training_type.change(
308
+ fn = change_training_setup,
309
+ inputs = [training_type],
310
+ outputs = [training_steps, checkpoint_step]
311
+ )
312
 
313
  train_btn.click(
314
  fn = main,