Update app.py
Browse files
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",
|
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
|
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"):
|