Spaces:
Runtime error
Runtime error
Commit
·
fe5728b
1
Parent(s):
300f50b
Update app.py
Browse files
app.py
CHANGED
@@ -189,8 +189,33 @@ with gr.Blocks() as app:
|
|
189 |
# The rest of your code for setting up the app
|
190 |
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
191 |
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result, post_processed_result])
|
192 |
-
post_process_button.click(
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
app.queue(max_size=20, concurrency_count=5)
|
196 |
app.launch()
|
|
|
189 |
# The rest of your code for setting up the app
|
190 |
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
191 |
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result, post_processed_result])
|
192 |
+
post_process_button.click(
|
193 |
+
fn=postprocess,
|
194 |
+
inputs=[
|
195 |
+
post_processed_result,
|
196 |
+
enabled,
|
197 |
+
downscale,
|
198 |
+
need_rescale,
|
199 |
+
enable_color_limit,
|
200 |
+
palette_size_color, # Updated this
|
201 |
+
quantization_methods_color, # Updated this
|
202 |
+
dither_methods_color, # Updated this
|
203 |
+
k_means_color, # Updated this
|
204 |
+
enable_grayscale, # Updated this
|
205 |
+
palette_size_gray, # Updated this
|
206 |
+
quantization_methods_gray, # Updated this
|
207 |
+
dither_methods_gray, # Updated this
|
208 |
+
k_means_gray, # Updated this
|
209 |
+
enable_black_and_white, # Updated this
|
210 |
+
inverse_black_and_white, # Updated this
|
211 |
+
threshold_black_and_white, # Updated this
|
212 |
+
enable_custom_palette, # Updated this
|
213 |
+
palette_image, # Updated this
|
214 |
+
palette_size_custom, # Updated this
|
215 |
+
dither_methods_custom # Updated this
|
216 |
+
],
|
217 |
+
outputs=[post_processed_result]
|
218 |
+
)
|
219 |
|
220 |
app.queue(max_size=20, concurrency_count=5)
|
221 |
app.launch()
|