Ahsen Khaliq
commited on
Commit
•
77631bb
1
Parent(s):
4323731
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def pixel(image):
|
|
7 |
downsample_by = 3 # new image will be 1/14th of the original in size
|
8 |
palette = 7 # find 7 colors
|
9 |
# 1) Instantiate Pyx transformer
|
10 |
-
pyx = Pyx(factor=downsample_by, palette=palette,depth=
|
11 |
# 2) fit an image, allow Pyxelate to learn the color palette
|
12 |
pyx.fit(image)
|
13 |
# 3) transform image to pixel art using the learned color palette
|
@@ -26,5 +26,6 @@ gr.Interface(
|
|
26 |
gr.outputs.Image(type="file", label="Output"),
|
27 |
title=title,
|
28 |
description=description,
|
29 |
-
article=article
|
|
|
30 |
).launch(debug=True)
|
|
|
7 |
downsample_by = 3 # new image will be 1/14th of the original in size
|
8 |
palette = 7 # find 7 colors
|
9 |
# 1) Instantiate Pyx transformer
|
10 |
+
pyx = Pyx(factor=downsample_by, palette=palette,depth=2)
|
11 |
# 2) fit an image, allow Pyxelate to learn the color palette
|
12 |
pyx.fit(image)
|
13 |
# 3) transform image to pixel art using the learned color palette
|
|
|
26 |
gr.outputs.Image(type="file", label="Output"),
|
27 |
title=title,
|
28 |
description=description,
|
29 |
+
article=article,
|
30 |
+
enable_queue=True
|
31 |
).launch(debug=True)
|