Upload 43 files
Browse files- .gitattributes +29 -0
- requirements.txt +7 -0
- static/gaultier/gaultier-garment-1.png +3 -0
- static/gaultier/gaultier-garment-10.png +3 -0
- static/gaultier/gaultier-garment-2.png +3 -0
- static/gaultier/gaultier-garment-3.png +3 -0
- static/gaultier/gaultier-garment-4.png +3 -0
- static/gaultier/gaultier-garment-5.png +3 -0
- static/gaultier/gaultier-garment-6.png +3 -0
- static/gaultier/gaultier-garment-7.png +3 -0
- static/gaultier/gaultier-garment-8.png +3 -0
- static/gaultier/gaultier-garment-9.png +3 -0
- static/icon.jpg +0 -0
- static/mugler/mugler-garment-1.png +3 -0
- static/mugler/mugler-garment-2.png +3 -0
- static/mugler/mugler-garment-3.png +3 -0
- static/mugler/mugler-garment-4.png +3 -0
- static/mugler/mugler-garment-5.png +3 -0
- static/pose0.png +3 -0
- static/pose1.png +3 -0
- static/pose2.png +3 -0
- static/style.css +195 -0
- static/title1.png +0 -0
- static/title2.png +0 -0
- static/title3.png +0 -0
- static/title4.png +0 -0
- static/users/gigi/gigi.png +3 -0
- static/users/gigi/index.html +43 -0
- static/users/gigi/vto_output0.png +3 -0
- static/users/gigi/vto_output1.png +3 -0
- static/users/gigi/vto_output2.png +3 -0
- static/users/gigi/vto_output3.png +3 -0
- static/users/tim/index.html +38 -0
- static/users/tim/tim.png +3 -0
- static/users/tim/vto_output0.png +3 -0
- static/users/tim/vto_output1.png +3 -0
- static/users/tim/vto_output2.png +3 -0
- static/users/tim/vto_output3.png +3 -0
- templates/index.html +160 -0
- title/title.psb +3 -0
- title/title1.png +0 -0
- title/title2.png +0 -0
- title/title3.png +0 -0
- title/title4.png +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,32 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
static/gaultier/gaultier-garment-1.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
static/gaultier/gaultier-garment-10.png filter=lfs diff=lfs merge=lfs -text
|
38 |
+
static/gaultier/gaultier-garment-2.png filter=lfs diff=lfs merge=lfs -text
|
39 |
+
static/gaultier/gaultier-garment-3.png filter=lfs diff=lfs merge=lfs -text
|
40 |
+
static/gaultier/gaultier-garment-4.png filter=lfs diff=lfs merge=lfs -text
|
41 |
+
static/gaultier/gaultier-garment-5.png filter=lfs diff=lfs merge=lfs -text
|
42 |
+
static/gaultier/gaultier-garment-6.png filter=lfs diff=lfs merge=lfs -text
|
43 |
+
static/gaultier/gaultier-garment-7.png filter=lfs diff=lfs merge=lfs -text
|
44 |
+
static/gaultier/gaultier-garment-8.png filter=lfs diff=lfs merge=lfs -text
|
45 |
+
static/gaultier/gaultier-garment-9.png filter=lfs diff=lfs merge=lfs -text
|
46 |
+
static/mugler/mugler-garment-1.png filter=lfs diff=lfs merge=lfs -text
|
47 |
+
static/mugler/mugler-garment-2.png filter=lfs diff=lfs merge=lfs -text
|
48 |
+
static/mugler/mugler-garment-3.png filter=lfs diff=lfs merge=lfs -text
|
49 |
+
static/mugler/mugler-garment-4.png filter=lfs diff=lfs merge=lfs -text
|
50 |
+
static/mugler/mugler-garment-5.png filter=lfs diff=lfs merge=lfs -text
|
51 |
+
static/pose0.png filter=lfs diff=lfs merge=lfs -text
|
52 |
+
static/pose1.png filter=lfs diff=lfs merge=lfs -text
|
53 |
+
static/pose2.png filter=lfs diff=lfs merge=lfs -text
|
54 |
+
static/users/gigi/gigi.png filter=lfs diff=lfs merge=lfs -text
|
55 |
+
static/users/gigi/vto_output0.png filter=lfs diff=lfs merge=lfs -text
|
56 |
+
static/users/gigi/vto_output1.png filter=lfs diff=lfs merge=lfs -text
|
57 |
+
static/users/gigi/vto_output2.png filter=lfs diff=lfs merge=lfs -text
|
58 |
+
static/users/gigi/vto_output3.png filter=lfs diff=lfs merge=lfs -text
|
59 |
+
static/users/tim/tim.png filter=lfs diff=lfs merge=lfs -text
|
60 |
+
static/users/tim/vto_output0.png filter=lfs diff=lfs merge=lfs -text
|
61 |
+
static/users/tim/vto_output1.png filter=lfs diff=lfs merge=lfs -text
|
62 |
+
static/users/tim/vto_output2.png filter=lfs diff=lfs merge=lfs -text
|
63 |
+
static/users/tim/vto_output3.png filter=lfs diff=lfs merge=lfs -text
|
64 |
+
title/title.psb filter=lfs diff=lfs merge=lfs -text
|
requirements.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
requests
|
2 |
+
pillow
|
3 |
+
rembg[cpu,cli]
|
4 |
+
flask
|
5 |
+
transformers
|
6 |
+
torch
|
7 |
+
sendgrid
|
static/gaultier/gaultier-garment-1.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-10.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-2.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-3.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-4.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-5.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-6.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-7.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-8.png
ADDED
![]() |
Git LFS Details
|
static/gaultier/gaultier-garment-9.png
ADDED
![]() |
Git LFS Details
|
static/icon.jpg
ADDED
![]() |
static/mugler/mugler-garment-1.png
ADDED
![]() |
Git LFS Details
|
static/mugler/mugler-garment-2.png
ADDED
![]() |
Git LFS Details
|
static/mugler/mugler-garment-3.png
ADDED
![]() |
Git LFS Details
|
static/mugler/mugler-garment-4.png
ADDED
![]() |
Git LFS Details
|
static/mugler/mugler-garment-5.png
ADDED
![]() |
Git LFS Details
|
static/pose0.png
ADDED
![]() |
Git LFS Details
|
static/pose1.png
ADDED
![]() |
Git LFS Details
|
static/pose2.png
ADDED
![]() |
Git LFS Details
|
static/style.css
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
font-family: Arial, sans-serif;
|
3 |
+
text-align: center;
|
4 |
+
margin: 0;
|
5 |
+
padding: 20px;
|
6 |
+
}
|
7 |
+
|
8 |
+
.title-img {
|
9 |
+
width: auto;
|
10 |
+
height: 30vh;
|
11 |
+
}
|
12 |
+
|
13 |
+
.title-img2 {
|
14 |
+
width: auto;
|
15 |
+
height: 30vh;
|
16 |
+
}
|
17 |
+
|
18 |
+
.upload-container {
|
19 |
+
border: 2px dashed #ccc;
|
20 |
+
padding: 20px;
|
21 |
+
margin: 20px auto;
|
22 |
+
width: 80%;
|
23 |
+
max-width: 400px;
|
24 |
+
cursor: pointer;
|
25 |
+
text-align: center;
|
26 |
+
position: relative;
|
27 |
+
min-height: 250px; /* Increased height */
|
28 |
+
display: flex;
|
29 |
+
flex-direction: column;
|
30 |
+
align-items: center;
|
31 |
+
justify-content: center;
|
32 |
+
}
|
33 |
+
|
34 |
+
.upload-container.dragging {
|
35 |
+
border-color: #007bff;
|
36 |
+
background-color: rgba(0, 123, 255, 0.1);
|
37 |
+
}
|
38 |
+
|
39 |
+
.upload-icon {
|
40 |
+
width: 60px;
|
41 |
+
height: 60px;
|
42 |
+
display: block;
|
43 |
+
margin: 10px auto;
|
44 |
+
}
|
45 |
+
|
46 |
+
.upload-text {
|
47 |
+
font-size: 16px;
|
48 |
+
margin: 10px 0;
|
49 |
+
}
|
50 |
+
|
51 |
+
.preview-image {
|
52 |
+
max-width: 100%;
|
53 |
+
max-height: 200px;
|
54 |
+
display: none;
|
55 |
+
border-radius: 10px;
|
56 |
+
}
|
57 |
+
|
58 |
+
.remove-image {
|
59 |
+
position: absolute;
|
60 |
+
top: 10px;
|
61 |
+
right: 10px;
|
62 |
+
background: transparent;
|
63 |
+
color: black;
|
64 |
+
border: none;
|
65 |
+
cursor: pointer;
|
66 |
+
font-size: 20px;
|
67 |
+
font-weight: bold;
|
68 |
+
width: 24px;
|
69 |
+
height: 24px;
|
70 |
+
text-align: center;
|
71 |
+
line-height: 22px;
|
72 |
+
border-radius: 50%;
|
73 |
+
}
|
74 |
+
|
75 |
+
/* Removed hover effect */
|
76 |
+
.remove-image:hover {
|
77 |
+
background: transparent;
|
78 |
+
}
|
79 |
+
|
80 |
+
input[type="email"] {
|
81 |
+
width: 80%;
|
82 |
+
max-width: 400px;
|
83 |
+
padding: 10px;
|
84 |
+
margin: 10px auto;
|
85 |
+
display: block;
|
86 |
+
}
|
87 |
+
|
88 |
+
button {
|
89 |
+
background-color: #007bff;
|
90 |
+
color: white;
|
91 |
+
padding: 10px 20px;
|
92 |
+
border: none;
|
93 |
+
cursor: pointer;
|
94 |
+
font-size: 16px;
|
95 |
+
margin-top: 10px;
|
96 |
+
}
|
97 |
+
|
98 |
+
button:hover {
|
99 |
+
background-color: #0056b3;
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
.hidden {
|
105 |
+
display: none;
|
106 |
+
opacity: 0;
|
107 |
+
transition: opacity 0.5s ease-in-out;
|
108 |
+
}
|
109 |
+
|
110 |
+
.fade {
|
111 |
+
transition: opacity 0.5s ease-in-out;
|
112 |
+
}
|
113 |
+
|
114 |
+
#confirmation-message {
|
115 |
+
font-size: 16px;
|
116 |
+
margin-top: 60px;
|
117 |
+
color: #333;
|
118 |
+
opacity: 0;
|
119 |
+
transition: opacity 0.5s ease-in-out;
|
120 |
+
}
|
121 |
+
|
122 |
+
|
123 |
+
.image-gallery {
|
124 |
+
display: flex;
|
125 |
+
flex-wrap: wrap;
|
126 |
+
justify-content: center;
|
127 |
+
gap: 30px; /* Increased spacing between images */
|
128 |
+
margin-top: 20px;
|
129 |
+
}
|
130 |
+
|
131 |
+
.image-item {
|
132 |
+
text-align: left; /* Align text to the left */
|
133 |
+
max-width: 280px; /* Increase max width of images */
|
134 |
+
flex: 1 1 calc(25% - 15px); /* 4 items per row on desktop */
|
135 |
+
}
|
136 |
+
|
137 |
+
.image-item img {
|
138 |
+
width: 100%; /* Make images fill their container */
|
139 |
+
max-width: 280px; /* Increase max size */
|
140 |
+
height: auto;
|
141 |
+
border-radius: 10px;
|
142 |
+
}
|
143 |
+
|
144 |
+
/* Adjust text styling under images */
|
145 |
+
.image-item p {
|
146 |
+
font-size: 16px; /* Small text */
|
147 |
+
font-weight: 100; /* Thinner font */
|
148 |
+
color: #444; /* Slightly lighter color */
|
149 |
+
margin-top: 5px;
|
150 |
+
text-align: left; /* Ensure text is left-aligned */
|
151 |
+
line-height: 1.2;
|
152 |
+
}
|
153 |
+
|
154 |
+
.examples-title {
|
155 |
+
font-family: "Bodoni", serif;
|
156 |
+
font-size: 24px;
|
157 |
+
text-align: center;
|
158 |
+
margin-top: 40px;
|
159 |
+
font-weight: 100;
|
160 |
+
}
|
161 |
+
|
162 |
+
.examples-container {
|
163 |
+
display: flex;
|
164 |
+
justify-content: center;
|
165 |
+
gap: 20px;
|
166 |
+
margin-top: 20px;
|
167 |
+
margin-bottom: 10%;
|
168 |
+
}
|
169 |
+
|
170 |
+
.example-image {
|
171 |
+
width: 200px;
|
172 |
+
height: auto;
|
173 |
+
border-radius: 10px;
|
174 |
+
transition: transform 0.3s ease-in-out;
|
175 |
+
}
|
176 |
+
|
177 |
+
.example-image:hover {
|
178 |
+
transform: scale(1.05);
|
179 |
+
}
|
180 |
+
|
181 |
+
|
182 |
+
/* Mobile view: Ensure 2 columns */
|
183 |
+
@media (max-width: 768px) {
|
184 |
+
.image-item {
|
185 |
+
flex: 1 1 calc(50% - 15px); /* 2 items per row on mobile */
|
186 |
+
}
|
187 |
+
.image-item p {
|
188 |
+
font-size: 12px;
|
189 |
+
}
|
190 |
+
.title-img2 {
|
191 |
+
height: 10vh;
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
|
static/title1.png
ADDED
![]() |
static/title2.png
ADDED
![]() |
static/title3.png
ADDED
![]() |
static/title4.png
ADDED
![]() |
static/users/gigi/gigi.png
ADDED
![]() |
Git LFS Details
|
static/users/gigi/index.html
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<!DOCTYPE html>
|
3 |
+
<html lang="en">
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7 |
+
<title>Your Generated Images</title>
|
8 |
+
<link rel="stylesheet" href="/static/style.css">
|
9 |
+
</head>
|
10 |
+
<body>
|
11 |
+
|
12 |
+
<img id="title-image" class="title-img2" src="/static/title3.png" alt="Title Image">
|
13 |
+
|
14 |
+
<div class="image-gallery">
|
15 |
+
<div class="image-item">
|
16 |
+
<a href="https://www.ssense.com/en-us/women/product/mugler/black-asymmetrical-double-layered-midi-dress/17149611" target="_blank">
|
17 |
+
<img src="/static/users/gigi/vto_output0.png" alt="Generated Image 1">
|
18 |
+
</a>
|
19 |
+
<p>MUGLER<br>Black Asymmetrical Double-Layered Midi Dress<br>$1680</p>
|
20 |
+
</div>
|
21 |
+
<div class="image-item">
|
22 |
+
<a href="https://www.ssense.com/en-us/women/product/mugler/multicolor-floral-print-pierced-ruched-midi-dress/17149791" target="_blank">
|
23 |
+
<img src="/static/users/gigi/vto_output1.png" alt="Generated Image 2">
|
24 |
+
</a>
|
25 |
+
<p>MUGLER<br>Multicolor Floral Print Pierced Ruched Midi Dress<br>$1230</p>
|
26 |
+
</div>
|
27 |
+
<div class="image-item">
|
28 |
+
<a href="https://www.ssense.com/en-us/women/product/mugler/blue-cutout-jeans/14374111" target="_blank">
|
29 |
+
<img src="/static/users/gigi/vto_output2.png" alt="Generated Image 3">
|
30 |
+
</a>
|
31 |
+
<p>MUGLER<br>Blue Cutout Jeans<br>$950</p>
|
32 |
+
</div>
|
33 |
+
<div class="image-item">
|
34 |
+
<a href="https://www.ssense.com/en-us/women/product/mugler/white-star-halter-midi-dress/17149771" target="_blank">
|
35 |
+
<img src="/static/users/gigi/vto_output3.png" alt="Generated Image 4">
|
36 |
+
</a>
|
37 |
+
<p>MUGLER<br>White Star Halter Midi Dress<br>$735</p>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
</body>
|
42 |
+
</html>
|
43 |
+
|
static/users/gigi/vto_output0.png
ADDED
![]() |
Git LFS Details
|
static/users/gigi/vto_output1.png
ADDED
![]() |
Git LFS Details
|
static/users/gigi/vto_output2.png
ADDED
![]() |
Git LFS Details
|
static/users/gigi/vto_output3.png
ADDED
![]() |
Git LFS Details
|
static/users/tim/index.html
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE 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>Your Generated Images</title>
|
7 |
+
<link rel="stylesheet" href="/static/style.css">
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<img id="title-image" class="title-img2" src="/static/title3.png" alt="Title Image">
|
11 |
+
<div class="image-gallery">
|
12 |
+
<div class="image-item">
|
13 |
+
<a href="https://www.ssense.com/en-us/men/product/jean-paul-gaultier/black-pinstripe-wool-cropped-tailored-blazer/17210041" target="_blank">
|
14 |
+
<img src="/static/users/tim/vto_output0.png" alt="Generated Image 1">
|
15 |
+
</a>
|
16 |
+
<p>JEAN PAUL GAULTIER<br>Black Pinstripe Wool Cropped Tailored Blazer<br>$1615</p>
|
17 |
+
</div>
|
18 |
+
<div class="image-item">
|
19 |
+
<a href="https://www.ssense.com/en-us/men/product/jean-paul-gaultier/khaki-shayne-oliver-edition-the-wrap-trousers/16046831" target="_blank">
|
20 |
+
<img src="/static/users/tim/vto_output1.png" alt="Generated Image 2">
|
21 |
+
</a>
|
22 |
+
<p>JEAN PAUL GAULTIER<br>Khaki Shayne Oliver Edition 'The Wrap' Trousers<br>$1080</p>
|
23 |
+
</div>
|
24 |
+
<div class="image-item">
|
25 |
+
<a href="https://www.ssense.com/en-us/men/product/jean-paul-gaultier/beige-the-tattoo-mariniere-t-shirt/17676171" target="_blank">
|
26 |
+
<img src="/static/users/tim/vto_output2.png" alt="Generated Image 3">
|
27 |
+
</a>
|
28 |
+
<p>JEAN PAUL GAULTIER<br>Beige 'The Tattoo Marinière' T-shirt<br>$340</p>
|
29 |
+
</div>
|
30 |
+
<div class="image-item">
|
31 |
+
<a href="https://www.ssense.com/en-us/men/product/jean-paul-gaultier/beige-the-deconstructed-trench-coat/17209201" target="_blank">
|
32 |
+
<img src="/static/users/tim/vto_output3.png" alt="Generated Image 4">
|
33 |
+
</a>
|
34 |
+
<p>JEAN PAUL GAULTIER<br>Beige 'The Deconstructed' Trench Coat<br>$2730</p>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
</body>
|
38 |
+
</html>
|
static/users/tim/tim.png
ADDED
![]() |
Git LFS Details
|
static/users/tim/vto_output0.png
ADDED
![]() |
Git LFS Details
|
static/users/tim/vto_output1.png
ADDED
![]() |
Git LFS Details
|
static/users/tim/vto_output2.png
ADDED
![]() |
Git LFS Details
|
static/users/tim/vto_output3.png
ADDED
![]() |
Git LFS Details
|
templates/index.html
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE 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>Flask App</title>
|
7 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
|
11 |
+
<img id="title-image" class="title-img" src="{{ url_for('static', filename='title1.png') }}" alt="Title Image">
|
12 |
+
|
13 |
+
<div class="upload-container fade" id="drop-area">
|
14 |
+
<img src="{{ url_for('static', filename='icon.jpg') }}" alt="Upload Icon" class="upload-icon">
|
15 |
+
<p class="upload-text">Upload your face image</p>
|
16 |
+
<input type="file" id="file-input" accept="image/*" hidden>
|
17 |
+
<img id="preview-image" class="preview-image" src="" alt="Image Preview">
|
18 |
+
<button id="remove-image" class="remove-image">×</button>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
<input type="email" id="email" class="fade" placeholder="Enter your email">
|
22 |
+
|
23 |
+
<button id="generate-btn" class="fade">Generate</button>
|
24 |
+
|
25 |
+
<p id="confirmation-message" class="fade hidden">
|
26 |
+
Your lookbook will be sent to your email in 5-20 minutes. Check your spam folder.
|
27 |
+
</p>
|
28 |
+
|
29 |
+
<script>
|
30 |
+
document.addEventListener("DOMContentLoaded", function () {
|
31 |
+
const fileInput = document.getElementById("file-input");
|
32 |
+
const dropArea = document.getElementById("drop-area");
|
33 |
+
const previewImage = document.getElementById("preview-image");
|
34 |
+
const removeImageBtn = document.getElementById("remove-image");
|
35 |
+
const icon = document.querySelector(".upload-icon");
|
36 |
+
const uploadText = document.querySelector(".upload-text");
|
37 |
+
const generateBtn = document.getElementById("generate-btn");
|
38 |
+
const emailInput = document.getElementById("email");
|
39 |
+
const confirmationMessage = document.getElementById("confirmation-message");
|
40 |
+
let uploadedFile = null;
|
41 |
+
previewImage.style.display = "none";
|
42 |
+
removeImageBtn.style.display = "none";
|
43 |
+
function fadeOut(element) {
|
44 |
+
element.style.opacity = "0";
|
45 |
+
setTimeout(() => {
|
46 |
+
element.style.display = "none";
|
47 |
+
}, 500);
|
48 |
+
}
|
49 |
+
function fadeIn(element) {
|
50 |
+
element.style.display = "block";
|
51 |
+
setTimeout(() => {
|
52 |
+
element.style.opacity = "1";
|
53 |
+
}, 50);
|
54 |
+
}
|
55 |
+
function updateTitleImage() {
|
56 |
+
const img = document.getElementById("title-image");
|
57 |
+
if (window.innerWidth > 768) {
|
58 |
+
img.src = "{{ url_for('static', filename='title2.png') }}";
|
59 |
+
} else {
|
60 |
+
img.src = "{{ url_for('static', filename='title1.png') }}";
|
61 |
+
}
|
62 |
+
}
|
63 |
+
window.addEventListener("resize", updateTitleImage);
|
64 |
+
updateTitleImage();
|
65 |
+
dropArea.addEventListener("dragover", (e) => {
|
66 |
+
e.preventDefault();
|
67 |
+
dropArea.classList.add("dragging");
|
68 |
+
});
|
69 |
+
dropArea.addEventListener("dragleave", () => {
|
70 |
+
dropArea.classList.remove("dragging");
|
71 |
+
});
|
72 |
+
dropArea.addEventListener("drop", (e) => {
|
73 |
+
e.preventDefault();
|
74 |
+
dropArea.classList.remove("dragging");
|
75 |
+
const file = e.dataTransfer.files[0];
|
76 |
+
handleFile(file);
|
77 |
+
});
|
78 |
+
dropArea.addEventListener("click", () => {
|
79 |
+
fileInput.click();
|
80 |
+
});
|
81 |
+
fileInput.addEventListener("change", function () {
|
82 |
+
const file = fileInput.files[0];
|
83 |
+
handleFile(file);
|
84 |
+
});
|
85 |
+
function handleFile(file) {
|
86 |
+
if (file && file.type.startsWith("image/")) {
|
87 |
+
const reader = new FileReader();
|
88 |
+
reader.onload = function (e) {
|
89 |
+
previewImage.src = e.target.result;
|
90 |
+
previewImage.style.display = "block";
|
91 |
+
removeImageBtn.style.display = "block";
|
92 |
+
icon.style.display = "none";
|
93 |
+
uploadText.style.display = "none";
|
94 |
+
};
|
95 |
+
reader.readAsDataURL(file);
|
96 |
+
uploadedFile = file;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
removeImageBtn.addEventListener("click", function (e) {
|
100 |
+
e.stopPropagation();
|
101 |
+
fileInput.value = "";
|
102 |
+
previewImage.style.display = "none";
|
103 |
+
removeImageBtn.style.display = "none";
|
104 |
+
icon.style.display = "block";
|
105 |
+
uploadText.style.display = "block";
|
106 |
+
previewImage.src = "";
|
107 |
+
uploadedFile = null;
|
108 |
+
});
|
109 |
+
generateBtn.addEventListener("click", function () {
|
110 |
+
const email = emailInput.value;
|
111 |
+
if (!email || !uploadedFile) {
|
112 |
+
alert("Please enter an email and select an image.");
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
const formData = new FormData();
|
117 |
+
formData.append("email", email);
|
118 |
+
formData.append("image", uploadedFile);
|
119 |
+
|
120 |
+
fetch("/generate", {
|
121 |
+
method: "POST",
|
122 |
+
body: formData,
|
123 |
+
})
|
124 |
+
.then(response => response.json().then(data => ({ status: response.status, body: data })))
|
125 |
+
.then(({ status, body }) => {
|
126 |
+
if (status === 400) {
|
127 |
+
alert(body.message); // This will show the message from Flask
|
128 |
+
return;
|
129 |
+
}
|
130 |
+
|
131 |
+
fadeOut(dropArea);
|
132 |
+
fadeOut(emailInput);
|
133 |
+
fadeOut(generateBtn);
|
134 |
+
|
135 |
+
setTimeout(() => {
|
136 |
+
fadeIn(confirmationMessage);
|
137 |
+
}, 500);
|
138 |
+
})
|
139 |
+
.catch(error => {
|
140 |
+
alert("An error occurred. Please try again.");
|
141 |
+
});
|
142 |
+
});
|
143 |
+
|
144 |
+
});
|
145 |
+
</script>
|
146 |
+
|
147 |
+
<h2 class="examples-title">Examples</h2>
|
148 |
+
|
149 |
+
<div class="examples-container">
|
150 |
+
<a href="https://huggingface.co/spaces/tonyassi/vto-pose-dev?id=gigi" target="_blank" rel="noopener noreferrer">
|
151 |
+
<img class="example-image" src="{{ url_for('static', filename='users/gigi/gigi.png') }}" alt="Gigi">
|
152 |
+
</a>
|
153 |
+
<a href="https://huggingface.co/spaces/tonyassi/vto-pose-dev?id=tim" target="_blank" rel="noopener noreferrer">
|
154 |
+
<img class="example-image" src="{{ url_for('static', filename='users/tim/tim.png') }}" alt="Tim">
|
155 |
+
</a>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
|
159 |
+
</body>
|
160 |
+
</html>
|
title/title.psb
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9e7ba7336303f65325678fd18ee0838bdceb833784053eb20a9a0d569cc94621
|
3 |
+
size 1019375
|
title/title1.png
ADDED
![]() |
title/title2.png
ADDED
![]() |
title/title3.png
ADDED
![]() |
title/title4.png
ADDED
![]() |