Spaces:
Running
Running
Merge branch 'main' into spaces
Browse files- app.py +9 -3
- example_images/bananas_out.jpeg +0 -0
- example_images/bananas_palette.jpeg +0 -0
app.py
CHANGED
@@ -12,7 +12,7 @@ with gr.Blocks() as demo:
|
|
12 |
|
13 |
with gr.Row(equal_height=True):
|
14 |
with gr.Column(variant="panel"):
|
15 |
-
img = gr.Image(label="Input Image")
|
16 |
pixel_size = gr.Number(label="Pixel Size", minimum=1, value=16)
|
17 |
blur = gr.Checkbox(label="Blur")
|
18 |
use_palette = gr.Checkbox(label="Use Palette")
|
@@ -20,12 +20,18 @@ with gr.Blocks() as demo:
|
|
20 |
|
21 |
with gr.Column(variant="panel"):
|
22 |
output_img = gr.Image(
|
23 |
-
label="Output Image", format="jpeg",
|
|
|
|
|
|
|
24 |
)
|
25 |
output_palette = gr.Image(
|
26 |
label="Image Palette",
|
|
|
27 |
show_download_button=False,
|
28 |
show_share_button=False,
|
|
|
|
|
29 |
visible=False,
|
30 |
)
|
31 |
|
@@ -52,7 +58,7 @@ with gr.Blocks() as demo:
|
|
52 |
examples=[
|
53 |
["example_images/bananas.jpg", 16, False, True, 8],
|
54 |
["example_images/scream.jpg", 16, False, True, 4],
|
55 |
-
["example_images/cat.jpg", 32, True, False, None],
|
56 |
["example_images/ducks.jpg", 4, False, True, 2],
|
57 |
],
|
58 |
inputs=[img, pixel_size, blur, use_palette, k],
|
|
|
12 |
|
13 |
with gr.Row(equal_height=True):
|
14 |
with gr.Column(variant="panel"):
|
15 |
+
img = gr.Image(label="Input Image",show_fullscreen_button=False)
|
16 |
pixel_size = gr.Number(label="Pixel Size", minimum=1, value=16)
|
17 |
blur = gr.Checkbox(label="Blur")
|
18 |
use_palette = gr.Checkbox(label="Use Palette")
|
|
|
20 |
|
21 |
with gr.Column(variant="panel"):
|
22 |
output_img = gr.Image(
|
23 |
+
label="Output Image", format="jpeg",
|
24 |
+
show_download_button=False,
|
25 |
+
show_share_button=False,
|
26 |
+
show_fullscreen_button=False
|
27 |
)
|
28 |
output_palette = gr.Image(
|
29 |
label="Image Palette",
|
30 |
+
format="jpeg",
|
31 |
show_download_button=False,
|
32 |
show_share_button=False,
|
33 |
+
show_fullscreen_button=False,
|
34 |
+
show_label=False,
|
35 |
visible=False,
|
36 |
)
|
37 |
|
|
|
58 |
examples=[
|
59 |
["example_images/bananas.jpg", 16, False, True, 8],
|
60 |
["example_images/scream.jpg", 16, False, True, 4],
|
61 |
+
# ["example_images/cat.jpg", 32, True, False, None],
|
62 |
["example_images/ducks.jpg", 4, False, True, 2],
|
63 |
],
|
64 |
inputs=[img, pixel_size, blur, use_palette, k],
|
example_images/bananas_out.jpeg
ADDED
![]() |
example_images/bananas_palette.jpeg
ADDED
![]() |