Spaces:
Runtime error
Runtime error
artificialguybr
commited on
Commit
•
80f9059
1
Parent(s):
af35943
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,6 @@ with gr.Blocks() as app:
|
|
66 |
result = gr.Image(interactive=False, label="Generated Image")
|
67 |
refined_result = gr.Image(interactive=False, label="Refined Generated Image")
|
68 |
post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
|
69 |
-
|
70 |
with gr.Tabs():
|
71 |
with gr.TabItem("Color"):
|
72 |
enable_color_limit = gr.Checkbox(label="Enable", value=False)
|
@@ -81,12 +80,18 @@ with gr.Blocks() as app:
|
|
81 |
use_color_palette = gr.Checkbox(label="Enable", value=False)
|
82 |
palette_image = gr.Image(label="Color palette image", type="pil")
|
83 |
palette_colors = gr.Slider(label="Palette Size (only for complex images)", minimum=1, maximum=256, step=1, value=16)
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
post_process_button = gr.Button("Apply Post-Processing")
|
86 |
|
87 |
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
88 |
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result, refined_result])
|
89 |
post_process_button.click(fn=apply_post_processing, inputs=[refined_result, downscale, limit_colors, grayscale, black_and_white], outputs=[post_processed_result])
|
90 |
-
|
91 |
app.queue(max_size=20, concurrency_count=5)
|
92 |
app.launch()
|
|
|
66 |
result = gr.Image(interactive=False, label="Generated Image")
|
67 |
refined_result = gr.Image(interactive=False, label="Refined Generated Image")
|
68 |
post_processed_result = gr.Image(interactive=False, label="Post-Processed Image")
|
|
|
69 |
with gr.Tabs():
|
70 |
with gr.TabItem("Color"):
|
71 |
enable_color_limit = gr.Checkbox(label="Enable", value=False)
|
|
|
80 |
use_color_palette = gr.Checkbox(label="Enable", value=False)
|
81 |
palette_image = gr.Image(label="Color palette image", type="pil")
|
82 |
palette_colors = gr.Slider(label="Palette Size (only for complex images)", minimum=1, maximum=256, step=1, value=16)
|
83 |
+
|
84 |
+
# Define downscale and other variables here
|
85 |
+
downscale = gr.Slider(label="Downscale", minimum=1, maximum=32, step=2, value=8)
|
86 |
+
limit_colors = gr.Checkbox(label="Limit Colors")
|
87 |
+
grayscale = gr.Checkbox(label="Grayscale")
|
88 |
+
black_and_white = gr.Checkbox(label="Black and White")
|
89 |
|
90 |
post_process_button = gr.Button("Apply Post-Processing")
|
91 |
|
92 |
gallery.select(update_selection, outputs=[prompt, selected_info, selected_state])
|
93 |
prompt.submit(fn=run_lora, inputs=[prompt, selected_state], outputs=[result, refined_result])
|
94 |
post_process_button.click(fn=apply_post_processing, inputs=[refined_result, downscale, limit_colors, grayscale, black_and_white], outputs=[post_processed_result])
|
95 |
+
|
96 |
app.queue(max_size=20, concurrency_count=5)
|
97 |
app.launch()
|