DemiPoto commited on
Commit
1f03a5b
·
verified ·
1 Parent(s): d6c4163

Update app.py

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