Ahsen Khaliq
commited on
Commit
·
bfafadf
1
Parent(s):
77631bb
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from pyxelate import Pyx, Pal
|
|
| 4 |
|
| 5 |
def pixel(image):
|
| 6 |
image = io.imread(image.name)
|
| 7 |
-
downsample_by =
|
| 8 |
palette = 7 # find 7 colors
|
| 9 |
# 1) Instantiate Pyx transformer
|
| 10 |
pyx = Pyx(factor=downsample_by, palette=palette,depth=2)
|
|
|
|
| 4 |
|
| 5 |
def pixel(image):
|
| 6 |
image = io.imread(image.name)
|
| 7 |
+
downsample_by = 14 # 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)
|