LPDoctor commited on
Commit
d94f26b
·
verified ·
1 Parent(s): 539a748

gr.List display style lists

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -256,8 +256,6 @@ def generate_image(
256
 
257
  generator = torch.Generator(device=device).manual_seed(seed)
258
 
259
- print("Start inference...")
260
- print(f"[Debug] 风格列表: {STYLE_NAMES}, \n[Debug] 风格类型: {type(STYLE_NAMES)}")
261
 
262
  pipe.set_ip_adapter_scale(adapter_strength_ratio)
263
  images = pipe(
@@ -396,7 +394,7 @@ with gr.Blocks(css=css) as demo:
396
 
397
  with gr.Column():
398
  output_image = gr.Image(label="Generated Image")
399
- # style_lists = gr.Dataframe(value=STYLE_NAMES,type='array',row_count=1)
400
  # usage_tips = gr.Markdown(label="Usage tips of InstantID", value=tips, visible=False)
401
 
402
  submit.click(
@@ -433,11 +431,11 @@ with gr.Blocks(css=css) as demo:
433
  outputs=output_image,
434
  )
435
 
436
- # style_event.select(
437
- # fn=get_style_lists,
438
- # outputs=style_lists,
439
- # queue=False,
440
- # )
441
 
442
  # gr.Examples(
443
  # examples=get_example(),
 
256
 
257
  generator = torch.Generator(device=device).manual_seed(seed)
258
 
 
 
259
 
260
  pipe.set_ip_adapter_scale(adapter_strength_ratio)
261
  images = pipe(
 
394
 
395
  with gr.Column():
396
  output_image = gr.Image(label="Generated Image")
397
+ style_lists = gr.List(STYLE_NAMES,label="style templates list",visible=True)
398
  # usage_tips = gr.Markdown(label="Usage tips of InstantID", value=tips, visible=False)
399
 
400
  submit.click(
 
431
  outputs=output_image,
432
  )
433
 
434
+ style_event.select(
435
+ fn=get_style_lists,
436
+ outputs=style_lists,
437
+ queue=False,
438
+ )
439
 
440
  # gr.Examples(
441
  # examples=get_example(),