Add 2 files
Browse files- README.md +6 -4
- index.html +379 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: blue
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: normal-image-to-ghibli-style-converter
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: blue
|
5 |
colorTo: blue
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,379 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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E html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Ghibli Style Converter</title>
|
7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
8 |
+
<style>
|
9 |
+
:root {
|
10 |
+
--ghibli-blue: #68A7D3;
|
11 |
+
--ghibli-green: #7FB881;
|
12 |
+
--ghibli-yellow: #F9DD69;
|
13 |
+
--ghibli-brown: #9B6A4A;
|
14 |
+
--ghibli-pink: #FE9A9A;
|
15 |
+
}
|
16 |
+
|
17 |
+
* {
|
18 |
+
margin: 0;
|
19 |
+
padding: 0;
|
20 |
+
box-sizing: border-box;
|
21 |
+
font-family: 'Courier New', monospace;
|
22 |
+
}
|
23 |
+
|
24 |
+
body {
|
25 |
+
background-color: #f5f5f5;
|
26 |
+
background-image:
|
27 |
+
linear-gradient(45deg, transparent 20%, rgba(104, 167, 211, 0.1) 20%),
|
28 |
+
linear-gradient(-45deg, transparent 20%, rgba(123, 184, 125, 0.1) 20%);
|
29 |
+
background-size: 40px 40px;
|
30 |
+
min-height: 100vh;
|
31 |
+
display: flex;
|
32 |
+
flex-direction: column;
|
33 |
+
align-items: center;
|
34 |
+
padding: 2rem;
|
35 |
+
}
|
36 |
+
|
37 |
+
header {
|
38 |
+
text-align: center;
|
39 |
+
margin-bottom: 2rem;
|
40 |
+
position: relative;
|
41 |
+
}
|
42 |
+
|
43 |
+
h1 {
|
44 |
+
color: var(--ghibli-brown);
|
45 |
+
font-size: 2.5rem;
|
46 |
+
margin-bottom: 0.5rem;
|
47 |
+
text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
|
48 |
+
position: relative;
|
49 |
+
display: inline-block;
|
50 |
+
}
|
51 |
+
|
52 |
+
h1::after {
|
53 |
+
content: "";
|
54 |
+
position: absolute;
|
55 |
+
bottom: -10px;
|
56 |
+
left: 0;
|
57 |
+
width: 100%;
|
58 |
+
height: 4px;
|
59 |
+
background: linear-gradient(90deg, var(--ghibli-blue), var(--ghibli-green), var(--ghibli-yellow), var(--ghibli-pink));
|
60 |
+
border-radius: 2px;
|
61 |
+
}
|
62 |
+
|
63 |
+
.subtitle {
|
64 |
+
color: var(--ghibli-green);
|
65 |
+
font-style: italic;
|
66 |
+
font-size: 1.2rem;
|
67 |
+
}
|
68 |
+
|
69 |
+
.main-container {
|
70 |
+
background-color: rgba(255, 255, 255, 0.9);
|
71 |
+
border-radius: 20px;
|
72 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
73 |
+
padding: 2rem;
|
74 |
+
width: 100%;
|
75 |
+
max-width: 900px;
|
76 |
+
position: relative;
|
77 |
+
overflow: hidden;
|
78 |
+
border: 2px solid var(--ghibli-blue);
|
79 |
+
}
|
80 |
+
|
81 |
+
.main-container::before {
|
82 |
+
content: "";
|
83 |
+
position: absolute;
|
84 |
+
top: 0;
|
85 |
+
left: 0;
|
86 |
+
width: 100%;
|
87 |
+
height: 15px;
|
88 |
+
background: linear-gradient(90deg, var(--ghibli-blue), var(--ghibli-green), var(--ghibli-yellow), var(--ghibli-pink));
|
89 |
+
}
|
90 |
+
|
91 |
+
.converter-box {
|
92 |
+
display: flex;
|
93 |
+
flex-direction: column;
|
94 |
+
align-items: center;
|
95 |
+
gap: 2rem;
|
96 |
+
}
|
97 |
+
|
98 |
+
.image-upload {
|
99 |
+
width: 100%;
|
100 |
+
display: flex;
|
101 |
+
flex-direction: column;
|
102 |
+
align-items: center;
|
103 |
+
}
|
104 |
+
|
105 |
+
.upload-area {
|
106 |
+
width: 300px;
|
107 |
+
height: 300px;
|
108 |
+
border: 3px dashed var(--ghibli-blue);
|
109 |
+
border-radius: 15px;
|
110 |
+
display: flex;
|
111 |
+
flex-direction: column;
|
112 |
+
justify-content: center;
|
113 |
+
align-items: center;
|
114 |
+
cursor: pointer;
|
115 |
+
transition: all 0.3s ease;
|
116 |
+
background-color: rgba(104, 167, 211, 0.1);
|
117 |
+
position: relative;
|
118 |
+
overflow: hidden;
|
119 |
+
}
|
120 |
+
|
121 |
+
.upload-area:hover {
|
122 |
+
background-color: rgba(104, 167, 211, 0.2);
|
123 |
+
transform: translateY(-5px);
|
124 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
125 |
+
}
|
126 |
+
|
127 |
+
.upload-icon {
|
128 |
+
font-size: 4rem;
|
129 |
+
color: var(--ghibli-blue);
|
130 |
+
margin-bottom: 1rem;
|
131 |
+
}
|
132 |
+
|
133 |
+
.upload-text {
|
134 |
+
color: var(--ghibli-brown);
|
135 |
+
font-size: 1.1rem;
|
136 |
+
text-align: center;
|
137 |
+
padding: 0 1rem;
|
138 |
+
}
|
139 |
+
|
140 |
+
#file-input {
|
141 |
+
display: none;
|
142 |
+
}
|
143 |
+
|
144 |
+
.preview-container {
|
145 |
+
display: flex;
|
146 |
+
flex-wrap: wrap;
|
147 |
+
justify-content: center;
|
148 |
+
gap: 2rem;
|
149 |
+
width: 100%;
|
150 |
+
margin-top: 1rem;
|
151 |
+
}
|
152 |
+
|
153 |
+
.preview-box {
|
154 |
+
flex: 1;
|
155 |
+
min-width: 250px;
|
156 |
+
max-width: 350px;
|
157 |
+
text-align: center;
|
158 |
+
}
|
159 |
+
|
160 |
+
.preview-title {
|
161 |
+
color: var(--ghibli-brown);
|
162 |
+
margin-bottom: 0.5rem;
|
163 |
+
font-weight: bold;
|
164 |
+
font-size: 1.2rem;
|
165 |
+
}
|
166 |
+
|
167 |
+
.preview-image {
|
168 |
+
width: 100%;
|
169 |
+
height: 250px;
|
170 |
+
object-fit: contain;
|
171 |
+
border: 2px solid var(--ghibli-brown);
|
172 |
+
border-radius: 10px;
|
173 |
+
background-color: #f9f6f2;
|
174 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
175 |
+
}
|
176 |
+
|
177 |
+
.controls {
|
178 |
+
display: flex;
|
179 |
+
flex-direction: column;
|
180 |
+
align-items: center;
|
181 |
+
gap: 1.5rem;
|
182 |
+
width: 100%;
|
183 |
+
}
|
184 |
+
|
185 |
+
.style-options {
|
186 |
+
display: flex;
|
187 |
+
flex-wrap: wrap;
|
188 |
+
justify-content: center;
|
189 |
+
gap: 1rem;
|
190 |
+
width: 100%;
|
191 |
+
}
|
192 |
+
|
193 |
+
.style-option {
|
194 |
+
padding: 0.8rem 1.5rem;
|
195 |
+
border-radius: 50px;
|
196 |
+
background-color: var(--ghibli-green);
|
197 |
+
color: white;
|
198 |
+
border: none;
|
199 |
+
cursor: pointer;
|
200 |
+
transition: all 0.3s ease;
|
201 |
+
font-weight: bold;
|
202 |
+
box-shadow: 0 3px 5px rgba(0,0,0,0.2);
|
203 |
+
display: flex;
|
204 |
+
align-items: center;
|
205 |
+
gap: 0.5rem;
|
206 |
+
}
|
207 |
+
|
208 |
+
.style-option:hover {
|
209 |
+
transform: translateY(-3px);
|
210 |
+
box-shadow: 0 5px 10px rgba(0,0,0,0.2);
|
211 |
+
}
|
212 |
+
|
213 |
+
.style-option.active {
|
214 |
+
background-color: var(--ghibli-blue);
|
215 |
+
transform: scale(1.05);
|
216 |
+
}
|
217 |
+
|
218 |
+
.style-option i {
|
219 |
+
font-size: 1.1rem;
|
220 |
+
}
|
221 |
+
|
222 |
+
.convert-btn {
|
223 |
+
padding: 1rem 2rem;
|
224 |
+
border-radius: 50px;
|
225 |
+
background-color: var(--ghibli-pink);
|
226 |
+
color: white;
|
227 |
+
border: none;
|
228 |
+
cursor: pointer;
|
229 |
+
font-size: 1.1rem;
|
230 |
+
font-weight: bold;
|
231 |
+
transition: all 0.3s ease;
|
232 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
233 |
+
display: flex;
|
234 |
+
align-items: center;
|
235 |
+
gap: 0.5rem;
|
236 |
+
}
|
237 |
+
|
238 |
+
.convert-btn:hover {
|
239 |
+
background-color: #fe7a7a;
|
240 |
+
transform: translateY(-5px);
|
241 |
+
box-shadow: 0 10px 20px rgba(0,0,0,0.2);
|
242 |
+
}
|
243 |
+
|
244 |
+
.convert-btn i {
|
245 |
+
font-size: 1.2rem;
|
246 |
+
animation: pulse 1.5s infinite;
|
247 |
+
}
|
248 |
+
|
249 |
+
@keyframes pulse {
|
250 |
+
0% { transform: scale(1); }
|
251 |
+
50% { transform: scale(1.2); }
|
252 |
+
100% { transform: scale(1); }
|
253 |
+
}
|
254 |
+
|
255 |
+
.download-btn {
|
256 |
+
padding: 1rem 2rem;
|
257 |
+
border-radius: 50px;
|
258 |
+
background-color: var(--ghibli-yellow);
|
259 |
+
color: #8a6d3b;
|
260 |
+
border: none;
|
261 |
+
cursor: pointer;
|
262 |
+
font-size: 1.1rem;
|
263 |
+
font-weight: bold;
|
264 |
+
transition: all 0.3s ease;
|
265 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
266 |
+
display: flex;
|
267 |
+
align-items: center;
|
268 |
+
gap: 0.5rem;
|
269 |
+
display: none;
|
270 |
+
}
|
271 |
+
|
272 |
+
.download-btn:hover {
|
273 |
+
background-color: #f8d247;
|
274 |
+
transform: translateY(-5px);
|
275 |
+
box-shadow: 0 10px 20px rgba(0,0,0,0.2);
|
276 |
+
}
|
277 |
+
|
278 |
+
.loading {
|
279 |
+
display: none;
|
280 |
+
flex-direction: column;
|
281 |
+
align-items: center;
|
282 |
+
gap: 1rem;
|
283 |
+
margin: 1rem 0;
|
284 |
+
}
|
285 |
+
|
286 |
+
.loading-spinner {
|
287 |
+
width: 50px;
|
288 |
+
height: 50px;
|
289 |
+
border: 5px solid rgba(104, 167, 211, 0.2);
|
290 |
+
border-radius: 50%;
|
291 |
+
border-top-color: var(--ghibli-blue);
|
292 |
+
animation: spin 1s ease-in-out infinite;
|
293 |
+
}
|
294 |
+
|
295 |
+
@keyframes spin {
|
296 |
+
to { transform: rotate(360deg); }
|
297 |
+
}
|
298 |
+
|
299 |
+
.loading-text {
|
300 |
+
color: var(--ghibli-brown);
|
301 |
+
font-style: italic;
|
302 |
+
}
|
303 |
+
|
304 |
+
.soot-sprite {
|
305 |
+
position: absolute;
|
306 |
+
width: 30px;
|
307 |
+
height: 30px;
|
308 |
+
background-color: #333;
|
309 |
+
border-radius: 50%;
|
310 |
+
opacity: 0.7;
|
311 |
+
animation: float 6s ease-in-out infinite;
|
312 |
+
z-index: -1;
|
313 |
+
}
|
314 |
+
|
315 |
+
@keyframes float {
|
316 |
+
0% { transform: translateY(0) rotate(0deg); }
|
317 |
+
50% { transform: translateY(-20px) rotate(5deg); }
|
318 |
+
100% { transform: translateY(0) rotate(0deg); }
|
319 |
+
}
|
320 |
+
|
321 |
+
footer {
|
322 |
+
margin-top: 2rem;
|
323 |
+
text-align: center;
|
324 |
+
color: var(--ghibli-brown);
|
325 |
+
font-size: 0.9rem;
|
326 |
+
}
|
327 |
+
|
328 |
+
/* Responsive adjustments */
|
329 |
+
@media (max-width: 768px) {
|
330 |
+
.preview-container {
|
331 |
+
flex-direction: column;
|
332 |
+
align-items: center;
|
333 |
+
}
|
334 |
+
|
335 |
+
.preview-box {
|
336 |
+
max-width: 100%;
|
337 |
+
}
|
338 |
+
|
339 |
+
h1 {
|
340 |
+
font-size: 2rem;
|
341 |
+
}
|
342 |
+
|
343 |
+
.subtitle {
|
344 |
+
font-size: 1rem;
|
345 |
+
}
|
346 |
+
}
|
347 |
+
</style>
|
348 |
+
</head>
|
349 |
+
<body>
|
350 |
+
<header>
|
351 |
+
<h1>Ghibli Style Converter</h1>
|
352 |
+
<p class="subtitle">Transform your photos into Studio Ghibli magical artwork</p>
|
353 |
+
</header>
|
354 |
+
|
355 |
+
<main class="main-container">
|
356 |
+
<div class="converter-box">
|
357 |
+
<div class="image-upload">
|
358 |
+
<input type="file" id="file-input" accept="image/*">
|
359 |
+
<div class="upload-area" id="upload-area">
|
360 |
+
<i class="fas fa-cloud-upload-alt upload-icon"></i>
|
361 |
+
<p class="upload-text">Click to upload an image or drag and drop</p>
|
362 |
+
</div>
|
363 |
+
</div>
|
364 |
+
|
365 |
+
<div class="preview-container">
|
366 |
+
<div class="preview-box">
|
367 |
+
<h3 class="preview-title">Original Image</h3>
|
368 |
+
<img id="original-preview" class="preview-image" src="data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='250' viewBox='0 0 300 250'%3E%3Crect width='300' height='250' fill='%23f9f6f2'/%3E%3Ctext x='150' y='125' font-family='Arial' font-size='14' fill='%239B6A4A' text-anchor='middle'%3EUPLOAD AN IMAGE TO BEGIN%3C/text%3E%3C/svg%3E" alt="Original Preview">
|
369 |
+
</div>
|
370 |
+
<div class="preview-box">
|
371 |
+
<h3 class="preview-title">Ghibli Style</h3>
|
372 |
+
<img id="ghibli-preview" class="preview-image" src="data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='250' viewBox='0 0 300 250'%3E%3Crect width='300' height='250' fill='%23f9f6f2'/%3E%3Ctext x='150' y='125' font-family='Arial' font-size='14' fill='%239B6A4A' text-anchor='middle'%3EPROCESSED IMAGE WILL APPEAR HERE%3C/text%3E%3C/svg%3E" alt="Ghibli Preview">
|
373 |
+
</div>
|
374 |
+
</div>
|
375 |
+
|
376 |
+
<div class="controls">
|
377 |
+
<div class="style-options">
|
378 |
+
<button class="style-option
|
379 |
+
</html>
|