Spaces:
Runtime error
Runtime error
artificialguybr
commited on
Commit
•
86f908d
1
Parent(s):
b4f66d8
Update app.py
Browse files
app.py
CHANGED
@@ -68,13 +68,12 @@ with gr.Blocks() as app:
|
|
68 |
button = gr.Button("Run")
|
69 |
|
70 |
result = gr.Image(interactive=False, label="Generated Image")
|
71 |
-
refined_result = gr.Image(interactive=False, label="Refined Generated Image")
|
72 |
post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
|
73 |
|
74 |
with gr.Blocks():
|
75 |
-
with gr.Accordion(label="Pixel art", open=
|
76 |
-
enabled = gr.Checkbox(label="Enable", value=False)
|
77 |
with gr.Row():
|
|
|
78 |
downscale = gr.Slider(label="Downscale", minimum=1, maximum=32, step=2, value=8)
|
79 |
need_rescale = gr.Checkbox(label="Rescale to original size", value=True)
|
80 |
with gr.Tabs():
|
@@ -106,8 +105,8 @@ with gr.Blocks():
|
|
106 |
post_process_button = gr.Button("Apply Post-Processing")
|
107 |
|
108 |
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
109 |
-
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result,
|
110 |
-
post_process_button.click(fn=apply_post_processing, inputs=[
|
111 |
|
112 |
|
113 |
app.queue(max_size=20, concurrency_count=5)
|
|
|
68 |
button = gr.Button("Run")
|
69 |
|
70 |
result = gr.Image(interactive=False, label="Generated Image")
|
|
|
71 |
post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
|
72 |
|
73 |
with gr.Blocks():
|
74 |
+
with gr.Accordion(label="Pixel art", open=True):
|
|
|
75 |
with gr.Row():
|
76 |
+
enabled = gr.Checkbox(label="Enable", value=False)
|
77 |
downscale = gr.Slider(label="Downscale", minimum=1, maximum=32, step=2, value=8)
|
78 |
need_rescale = gr.Checkbox(label="Rescale to original size", value=True)
|
79 |
with gr.Tabs():
|
|
|
105 |
post_process_button = gr.Button("Apply Post-Processing")
|
106 |
|
107 |
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
108 |
+
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result, post_processed_result])
|
109 |
+
post_process_button.click(fn=apply_post_processing, inputs=[post_processed_result, downscale, enable_color_limit, enable_grayscale, enable_black_and_white], outputs=[post_processed_result])
|
110 |
|
111 |
|
112 |
app.queue(max_size=20, concurrency_count=5)
|