latostadaok commited on
Commit
1dbff42
·
1 Parent(s): 34ce30a

Refactor app.load function to improve clarity and update output parameters

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -505,25 +505,25 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, delete_cache=(60, 60)) as app:
505
  )
506
 
507
 
508
- # Set default selection to "Day of the Tentacle Style"
509
- default_index = next(
510
- i for i, l in enumerate(loras)
511
- if l["repo"] == "lichorosario/qwen-image-dottrmstr"
512
- )
513
-
514
- app.load(
515
- fn=lambda: (
516
- gr.update(value="Speed (8 steps)"), # speed_mode
517
- gr.update(value="3:1"), # aspect_ratio
518
- gr.update(value=default_index), # selected_index (State)
519
- gr.update(selected_index=default_index), # galería marca tarjeta
520
- gr.update(value=2.5) # galería marca tarjeta
521
- ),
522
- inputs=[],
523
- outputs=[speed_mode, aspect_ratio, selected_index, gallery, cfg_scale]
524
- )
525
-
526
- ###############
527
 
528
 
529
  app.queue()
 
505
  )
506
 
507
 
508
+ # Set default selection to "Day of the Tentacle Style"
509
+ default_index = next(
510
+ i for i, l in enumerate(loras)
511
+ if l["repo"] == "lichorosario/qwen-image-dottrmstr"
512
+ )
513
+
514
+ app.load(
515
+ fn=lambda: (
516
+ gr.update(value="Speed (8 steps)"), # speed_mode
517
+ gr.update(value="3:1"), # aspect_ratio
518
+ gr.update(value=default_index), # selected_index (State)
519
+ gr.update(selected_index=default_index), # galería marca tarjeta
520
+ gr.update(value=2.5) # escala del lora
521
+ ),
522
+ inputs=[],
523
+ outputs=[speed_mode, aspect_ratio, selected_index, gallery, lora_scale]
524
+ )
525
+
526
+ ###############
527
 
528
 
529
  app.queue()