Spaces:
Runtime error
Runtime error
artificialguybr
commited on
Commit
•
5f9b2c5
1
Parent(s):
86f908d
Update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ with gr.Blocks() as app:
|
|
70 |
result = gr.Image(interactive=False, label="Generated Image")
|
71 |
post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
|
72 |
|
73 |
-
|
74 |
with gr.Accordion(label="Pixel art", open=True):
|
75 |
with gr.Row():
|
76 |
enabled = gr.Checkbox(label="Enable", value=False)
|
@@ -103,11 +103,11 @@ with gr.Blocks():
|
|
103 |
dither_methods_custom = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method")
|
104 |
|
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)
|
113 |
app.launch()
|
|
|
70 |
result = gr.Image(interactive=False, label="Generated Image")
|
71 |
post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
|
72 |
|
73 |
+
# Accordion moved here, inside the same gr.Blocks context
|
74 |
with gr.Accordion(label="Pixel art", open=True):
|
75 |
with gr.Row():
|
76 |
enabled = gr.Checkbox(label="Enable", value=False)
|
|
|
103 |
dither_methods_custom = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method")
|
104 |
|
105 |
post_process_button = gr.Button("Apply Post-Processing")
|
|
|
|
|
|
|
|
|
106 |
|
107 |
+
# The rest of your code for setting up the app
|
108 |
+
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
109 |
+
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result, post_processed_result])
|
110 |
+
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])
|
111 |
|
112 |
app.queue(max_size=20, concurrency_count=5)
|
113 |
app.launch()
|