Spaces:
Runtime error
Runtime error
Commit
·
5ccfd0c
1
Parent(s):
7240ddc
Update app.py
Browse files
app.py
CHANGED
|
@@ -80,15 +80,15 @@ with gr.Blocks() as app:
|
|
| 80 |
with gr.TabItem("Color"):
|
| 81 |
enable_color_limit = gr.Checkbox(label="Enable", value=False)
|
| 82 |
palette_size_color = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
|
| 83 |
-
quantization_methods_color = gr.Radio(choices=["Median Cut", "Maximum Coverage", "Fast Octree"], label="Colors Quantization Method")
|
| 84 |
-
dither_methods_color = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method")
|
| 85 |
k_means_color = gr.Checkbox(label="Enable k-means for color quantization", value=True)
|
| 86 |
|
| 87 |
with gr.TabItem("Grayscale"):
|
| 88 |
enable_grayscale = gr.Checkbox(label="Enable", value=False)
|
| 89 |
palette_size_gray = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
|
| 90 |
-
quantization_methods_gray = gr.Radio(choices=["Median Cut", "Maximum Coverage", "Fast Octree"], label="Colors Quantization Method")
|
| 91 |
-
dither_methods_gray = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method")
|
| 92 |
k_means_gray = gr.Checkbox(label="Enable k-means for color quantization", value=True)
|
| 93 |
|
| 94 |
with gr.TabItem("Black and white"):
|
|
@@ -100,7 +100,7 @@ with gr.Blocks() as app:
|
|
| 100 |
enable_custom_palette = gr.Checkbox(label="Enable", value=False)
|
| 101 |
palette_image = gr.Image(label="Color palette image", type="pil")
|
| 102 |
palette_size_custom = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
|
| 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 |
|
|
|
|
| 80 |
with gr.TabItem("Color"):
|
| 81 |
enable_color_limit = gr.Checkbox(label="Enable", value=False)
|
| 82 |
palette_size_color = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
|
| 83 |
+
quantization_methods_color = gr.Radio(choices=["Median Cut", "Maximum Coverage", "Fast Octree"], label="Colors Quantization Method", value="Median Cut")
|
| 84 |
+
dither_methods_color = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method", value="None")
|
| 85 |
k_means_color = gr.Checkbox(label="Enable k-means for color quantization", value=True)
|
| 86 |
|
| 87 |
with gr.TabItem("Grayscale"):
|
| 88 |
enable_grayscale = gr.Checkbox(label="Enable", value=False)
|
| 89 |
palette_size_gray = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
|
| 90 |
+
quantization_methods_gray = gr.Radio(choices=["Median Cut", "Maximum Coverage", "Fast Octree"], label="Colors Quantization Method", value="Median Cut")
|
| 91 |
+
dither_methods_gray = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method", value="None")
|
| 92 |
k_means_gray = gr.Checkbox(label="Enable k-means for color quantization", value=True)
|
| 93 |
|
| 94 |
with gr.TabItem("Black and white"):
|
|
|
|
| 100 |
enable_custom_palette = gr.Checkbox(label="Enable", value=False)
|
| 101 |
palette_image = gr.Image(label="Color palette image", type="pil")
|
| 102 |
palette_size_custom = gr.Slider(label="Palette Size", minimum=1, maximum=256, step=1, value=16)
|
| 103 |
+
dither_methods_custom = gr.Radio(choices=["None", "Floyd-Steinberg"], label="Colors Dither Method", value="None")
|
| 104 |
|
| 105 |
post_process_button = gr.Button("Apply Post-Processing")
|
| 106 |
|