Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -263,24 +263,24 @@ def fonc_del_param(lp,txt_input,neg_input,width,height,steps,cfg,seed):
|
|
| 263 |
|
| 264 |
def make_me():
|
| 265 |
with gr.Row():
|
| 266 |
-
with gr.
|
| 267 |
-
with gr.
|
| 268 |
txt_input = gr.Textbox(label='Your prompt:', lines=3, interactive = True)
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
list_param=gr.Dropdown(choices=[["a",[["","",0,0,0,0,-1]]]], value=[["","",0,0,0,0,-1]], visible=False)
|
| 285 |
|
| 286 |
add_param=gr.Button("add to the list")
|
|
@@ -289,8 +289,8 @@ def make_me():
|
|
| 289 |
#stop_button = gr.Button('Stop', variant='secondary', interactive=False, scale=1)
|
| 290 |
#gen_button.click(lambda: gr.update(interactive=True), None, stop_button)
|
| 291 |
|
| 292 |
-
print(list_param.value)
|
| 293 |
disp_param = gr.Examples(
|
|
|
|
| 294 |
examples=list_param.value,
|
| 295 |
inputs=[txt_input,neg_input,width,height,steps,cfg,seed],
|
| 296 |
outputs=[txt_input,neg_input,width,height,steps,cfg,seed],
|
|
|
|
| 263 |
|
| 264 |
def make_me():
|
| 265 |
with gr.Row():
|
| 266 |
+
with gr.Group():
|
| 267 |
+
with gr.Column(scale=4):
|
| 268 |
txt_input = gr.Textbox(label='Your prompt:', lines=3, interactive = True)
|
| 269 |
+
neg_input = gr.Textbox(label='Negative prompt:', lines=1, interactive = True)
|
| 270 |
+
with gr.Column(scale=4)
|
| 271 |
+
with gr.Row():
|
| 272 |
+
width = gr.Slider(label="Width", info="If 0, the default value is used.", maximum=2024, step=32, value=0, interactive = True)
|
| 273 |
+
height = gr.Slider(label="Height", info="If 0, the default value is used.", maximum=2024, step=32, value=0, interactive = True)
|
| 274 |
+
with gr.Row():
|
| 275 |
+
choice_ratio = gr.Dropdown(label="Ratio Width/Height",
|
| 276 |
+
info="OverWrite Width and Height (W*H<1024*1024)",
|
| 277 |
+
show_label=True, choices=list(list_ratios) , interactive = True, value=list_ratios[0][1])
|
| 278 |
+
choice_ratio.change(ratio_chosen,[choice_ratio,width,height],[width,height])
|
| 279 |
+
with gr.Row():
|
| 280 |
+
steps = gr.Slider(label="Number of inference steps", info="If 0, the default value is used.", maximum=100, step=1, value=0, interactive = True)
|
| 281 |
+
cfg = gr.Slider(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0, interactive = True)
|
| 282 |
+
seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1, interactive = True)
|
| 283 |
+
|
| 284 |
list_param=gr.Dropdown(choices=[["a",[["","",0,0,0,0,-1]]]], value=[["","",0,0,0,0,-1]], visible=False)
|
| 285 |
|
| 286 |
add_param=gr.Button("add to the list")
|
|
|
|
| 289 |
#stop_button = gr.Button('Stop', variant='secondary', interactive=False, scale=1)
|
| 290 |
#gen_button.click(lambda: gr.update(interactive=True), None, stop_button)
|
| 291 |
|
|
|
|
| 292 |
disp_param = gr.Examples(
|
| 293 |
+
label="list of prompt",
|
| 294 |
examples=list_param.value,
|
| 295 |
inputs=[txt_input,neg_input,width,height,steps,cfg,seed],
|
| 296 |
outputs=[txt_input,neg_input,width,height,steps,cfg,seed],
|