Spaces:
Running
Running
Commit
·
0ad138f
1
Parent(s):
73b14c1
Update app.py
Browse files
app.py
CHANGED
@@ -15,11 +15,73 @@ def pixel(image,downsample,palette,depth,upscale):
|
|
15 |
# save new image with 'skimage.io.imsave()'
|
16 |
io.imsave("pixel.png", new_image)
|
17 |
return "pixel.png"
|
18 |
-
|
19 |
title = "Imagen a Pixel Art"
|
20 |
description = ""
|
21 |
article = ""
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
gr.Interface(
|
25 |
pixel,
|
|
|
15 |
# save new image with 'skimage.io.imsave()'
|
16 |
io.imsave("pixel.png", new_image)
|
17 |
return "pixel.png"
|
18 |
+
|
19 |
title = "Imagen a Pixel Art"
|
20 |
description = ""
|
21 |
article = ""
|
22 |
+
css = """
|
23 |
+
footer {visibility: hidden}
|
24 |
+
.gradio-container {
|
25 |
+
font-family: 'IBM Plex Sans', sans-serif;
|
26 |
+
}
|
27 |
+
.gr-button {
|
28 |
+
color: white;
|
29 |
+
border-color: black;
|
30 |
+
background: black;
|
31 |
+
}
|
32 |
+
input[type='range'] {
|
33 |
+
accent-color: black;
|
34 |
+
}
|
35 |
+
.dark input[type='range'] {
|
36 |
+
accent-color: #dfdfdf;
|
37 |
+
}
|
38 |
+
.container {
|
39 |
+
max-width: 730px;
|
40 |
+
margin: auto;
|
41 |
+
padding-top: 1.5rem;
|
42 |
+
}
|
43 |
+
|
44 |
+
.details:hover {
|
45 |
+
text-decoration: underline;
|
46 |
+
}
|
47 |
+
.gr-button {
|
48 |
+
white-space: nowrap;
|
49 |
+
}
|
50 |
+
.gr-button:focus {
|
51 |
+
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
52 |
+
outline: none;
|
53 |
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
54 |
+
--tw-border-opacity: 1;
|
55 |
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
56 |
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
|
57 |
+
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
58 |
+
--tw-ring-opacity: .5;
|
59 |
+
}
|
60 |
+
.footer {
|
61 |
+
margin-bottom: 45px;
|
62 |
+
margin-top: 35px;
|
63 |
+
text-align: center;
|
64 |
+
border-bottom: 1px solid #e5e5e5;
|
65 |
+
}
|
66 |
+
.footer>p {
|
67 |
+
font-size: .8rem;
|
68 |
+
display: inline-block;
|
69 |
+
padding: 0 10px;
|
70 |
+
transform: translateY(10px);
|
71 |
+
background: white;
|
72 |
+
}
|
73 |
+
.dark .footer {
|
74 |
+
border-color: #303030;
|
75 |
+
}
|
76 |
+
.dark .footer>p {
|
77 |
+
background: #0b0f19;
|
78 |
+
}
|
79 |
+
.prompt h4{
|
80 |
+
margin: 1.25em 0 .25em 0;
|
81 |
+
font-weight: bold;
|
82 |
+
font-size: 115%;
|
83 |
+
}
|
84 |
+
"""
|
85 |
|
86 |
gr.Interface(
|
87 |
pixel,
|