Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -249,8 +249,8 @@ list_ratios=[["None",[None,None]],
|
|
| 249 |
["5:12 (640 x 1536)",[640,1536]],
|
| 250 |
["1:4 (512 x 2048)",[512,2048]]]
|
| 251 |
|
| 252 |
-
def fonc_add_param(
|
| 253 |
-
lp.append(
|
| 254 |
return gr.Examples(examples=lp) , gr.Dropdown(choices=["a",lp], value=lp)
|
| 255 |
|
| 256 |
def make_me():
|
|
@@ -275,7 +275,6 @@ def make_me():
|
|
| 275 |
param_actu=[txt_input,neg_input,width,height,steps,cfg,seed]
|
| 276 |
list_param=[["prompt","neg p",1024,800,50,3.0],["prompt 2","neg p 2",720,1200,30,2.5]]
|
| 277 |
lp=gr.Dropdown(choices=["a",list_param], value=list_param, visible=False)
|
| 278 |
-
pa=gr.Dropdown(choices=["a",param_actu], value=param_actu, visible=False)
|
| 279 |
|
| 280 |
add_param=gr.Button("add to the list")
|
| 281 |
del_param=gr.Button("delete to the list")
|
|
@@ -290,7 +289,7 @@ def make_me():
|
|
| 290 |
outputs=[txt_input,neg_input,width,height,steps,cfg,seed],
|
| 291 |
)
|
| 292 |
|
| 293 |
-
add_param.click(fonc_add_param,[
|
| 294 |
|
| 295 |
|
| 296 |
js_code = """
|
|
|
|
| 249 |
["5:12 (640 x 1536)",[640,1536]],
|
| 250 |
["1:4 (512 x 2048)",[512,2048]]]
|
| 251 |
|
| 252 |
+
def fonc_add_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
| 253 |
+
lp.append([txt_input,neg_input,width,height,steps,cfg,seed])
|
| 254 |
return gr.Examples(examples=lp) , gr.Dropdown(choices=["a",lp], value=lp)
|
| 255 |
|
| 256 |
def make_me():
|
|
|
|
| 275 |
param_actu=[txt_input,neg_input,width,height,steps,cfg,seed]
|
| 276 |
list_param=[["prompt","neg p",1024,800,50,3.0],["prompt 2","neg p 2",720,1200,30,2.5]]
|
| 277 |
lp=gr.Dropdown(choices=["a",list_param], value=list_param, visible=False)
|
|
|
|
| 278 |
|
| 279 |
add_param=gr.Button("add to the list")
|
| 280 |
del_param=gr.Button("delete to the list")
|
|
|
|
| 289 |
outputs=[txt_input,neg_input,width,height,steps,cfg,seed],
|
| 290 |
)
|
| 291 |
|
| 292 |
+
add_param.click(fonc_add_param,[lp,txt_input,neg_input,width,height,steps,cfg,seed],[disp_param,lp])
|
| 293 |
|
| 294 |
|
| 295 |
js_code = """
|