Sebastiankay commited on
Commit
e3af4dc
·
verified ·
1 Parent(s): 3e04236

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -429,7 +429,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
429
  gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
430
  with gr.Row():
431
  with gr.Column():
432
- preprocessor_name = gr.Radio(label="Preprocessor", choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", value="Lineart")
433
  input_image = gr.Image(label="Input Image", type="numpy", height=512)
434
  invert = gr.Checkbox(label="Invert", value=True)
435
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
@@ -438,7 +438,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
438
  with gr.Column():
439
  gallery = gr.Gallery(label="Generated images", show_label=False, height="auto")
440
 
441
- preprocessor_name.input(lambda preprocessor_name: gr.update(preprocessor_name.value), inputs=[preprocessor_name], outputs=[run_button])
442
  run_button.click(fn=lineart, inputs=[input_image, resolution, preprocessor_name, invert], outputs=[gallery])
443
 
444
  with gr.Tab("InPaint"):
 
429
  gr.Markdown("## Lineart \n<p>Check Invert to use with Mochi Diffusion. Inverted image can also be created here for use with ControlNet Scribble.")
430
  with gr.Row():
431
  with gr.Column():
432
+ preprocessor_name = gr.Radio(label="Preprocessor", choices=["Lineart", "Lineart Coarse", "Lineart Anime"], type="value", default="Lineart")
433
  input_image = gr.Image(label="Input Image", type="numpy", height=512)
434
  invert = gr.Checkbox(label="Invert", value=True)
435
  resolution = gr.Slider(label="resolution", minimum=256, maximum=1024, value=512, step=64)
 
438
  with gr.Column():
439
  gallery = gr.Gallery(label="Generated images", show_label=False, height="auto")
440
 
441
+ preprocessor_name.input(lambda preprocessor_name: gr.update(preprocessor_name), inputs=[preprocessor_name], outputs=[run_button])
442
  run_button.click(fn=lineart, inputs=[input_image, resolution, preprocessor_name, invert], outputs=[gallery])
443
 
444
  with gr.Tab("InPaint"):