Spaces:
Sleeping
Sleeping
whitecolor
commited on
Commit
•
1da4c1a
1
Parent(s):
885b235
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ MODEL_MAP = {
|
|
38 |
def add_waterprint(img):
|
39 |
|
40 |
h, w, _ = img.shape
|
41 |
-
img = cv2.putText(img, '
|
42 |
|
43 |
return img
|
44 |
|
@@ -92,14 +92,14 @@ with gr.Blocks(css = ".output-image, .input-image, .image-preview {height: 400px
|
|
92 |
<a href="https://github.com/HumanAIGC/OutfitAnyone" style="margin-right: 20px; text-decoration: none; display: flex; align-items: center;">
|
93 |
</a>
|
94 |
<div>
|
95 |
-
<h1 >
|
96 |
-
|
97 |
<h5 style="margin: 0;">If you like our project, please give us a star on Github to stay updated with the latest developments.</h5>
|
98 |
<div style="display: flex; justify-content: center; align-items: center; text-align: center;>
|
99 |
<a href="https://github.com/HumanAIGC/OutfitAnyone"><img src="https://img.shields.io/badge/Arxiv-0000.00000-red"></a>
|
100 |
<a href='https://humanaigc.github.io/outfit-anyone/'><img src='https://img.shields.io/badge/Project_Page-OutfitAnyone-green' alt='Project Page'></a>
|
101 |
<a href='https://github.com/HumanAIGC/OutfitAnyone'><img src='https://img.shields.io/badge/Github-Repo-blue'></a>
|
102 |
-
</div
|
103 |
</div>
|
104 |
</div>
|
105 |
""")
|
@@ -126,12 +126,12 @@ with gr.Blocks(css = ".output-image, .input-image, .image-preview {height: 400px
|
|
126 |
with gr.Column():
|
127 |
gr.HTML(
|
128 |
"""
|
129 |
-
|
130 |
<div>
|
131 |
<h3>Models are fixed and cannot be uploaded or modified; we only support users uploading their own garments.</h3>
|
132 |
<h4 style="margin: 0;">For a one-piece dress or coat, you only need to upload the image to the 'top garment' section and leave the 'lower garment' section empty.</h4>
|
133 |
</div>
|
134 |
-
</div
|
135 |
""")
|
136 |
with gr.Row():
|
137 |
garment_top = gr.Image(sources='upload', type="numpy", label="top garment")
|
@@ -168,20 +168,20 @@ with gr.Blocks(css = ".output-image, .input-image, .image-preview {height: 400px
|
|
168 |
|
169 |
|
170 |
# Examples
|
171 |
-
gr.Markdown("## Examples")
|
172 |
-
with gr.Row():
|
173 |
-
reference_image1 = gr.Image(label="model", scale=1, value="examples/basemodel.png")
|
174 |
-
reference_image2 = gr.Image(label="garment", scale=1, value="examples/garment1.jpg")
|
175 |
-
reference_image3 = gr.Image(label="result", scale=1, value="examples/result1.png")
|
176 |
-
gr.Examples(
|
177 |
-
examples=[
|
178 |
-
["examples/basemodel.png", "examples/garment1.png", "examples/result1.png"],
|
179 |
-
["examples/basemodel.png", "examples/garment2.png", "examples/result2.png"],
|
180 |
-
["examples/basemodel.png", "examples/garment3.png", "examples/result3.png"],
|
181 |
-
],
|
182 |
-
inputs=[reference_image1, reference_image2, reference_image3],
|
183 |
-
label=None,
|
184 |
-
)
|
185 |
|
186 |
if __name__ == "__main__":
|
187 |
ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
|
|
|
38 |
def add_waterprint(img):
|
39 |
|
40 |
h, w, _ = img.shape
|
41 |
+
img = cv2.putText(img, 'www.sommer-co.com', (int(0.3*w), h-20), cv2.FONT_HERSHEY_PLAIN, 2, (128, 128, 128), 2, cv2.LINE_AA)
|
42 |
|
43 |
return img
|
44 |
|
|
|
92 |
<a href="https://github.com/HumanAIGC/OutfitAnyone" style="margin-right: 20px; text-decoration: none; display: flex; align-items: center;">
|
93 |
</a>
|
94 |
<div>
|
95 |
+
<h1 >MeinNeuesOutfit. Jedes Kleidungsstück zu jeder Person.</h1>
|
96 |
+
<!--<h4 >v0.9</h4>
|
97 |
<h5 style="margin: 0;">If you like our project, please give us a star on Github to stay updated with the latest developments.</h5>
|
98 |
<div style="display: flex; justify-content: center; align-items: center; text-align: center;>
|
99 |
<a href="https://github.com/HumanAIGC/OutfitAnyone"><img src="https://img.shields.io/badge/Arxiv-0000.00000-red"></a>
|
100 |
<a href='https://humanaigc.github.io/outfit-anyone/'><img src='https://img.shields.io/badge/Project_Page-OutfitAnyone-green' alt='Project Page'></a>
|
101 |
<a href='https://github.com/HumanAIGC/OutfitAnyone'><img src='https://img.shields.io/badge/Github-Repo-blue'></a>
|
102 |
+
</div>-->
|
103 |
</div>
|
104 |
</div>
|
105 |
""")
|
|
|
126 |
with gr.Column():
|
127 |
gr.HTML(
|
128 |
"""
|
129 |
+
<!--<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
130 |
<div>
|
131 |
<h3>Models are fixed and cannot be uploaded or modified; we only support users uploading their own garments.</h3>
|
132 |
<h4 style="margin: 0;">For a one-piece dress or coat, you only need to upload the image to the 'top garment' section and leave the 'lower garment' section empty.</h4>
|
133 |
</div>
|
134 |
+
</div>-->
|
135 |
""")
|
136 |
with gr.Row():
|
137 |
garment_top = gr.Image(sources='upload', type="numpy", label="top garment")
|
|
|
168 |
|
169 |
|
170 |
# Examples
|
171 |
+
# gr.Markdown("## Examples")
|
172 |
+
# with gr.Row():
|
173 |
+
# reference_image1 = gr.Image(label="model", scale=1, value="examples/basemodel.png")
|
174 |
+
# reference_image2 = gr.Image(label="garment", scale=1, value="examples/garment1.jpg")
|
175 |
+
# reference_image3 = gr.Image(label="result", scale=1, value="examples/result1.png")
|
176 |
+
# gr.Examples(
|
177 |
+
# examples=[
|
178 |
+
# ["examples/basemodel.png", "examples/garment1.png", "examples/result1.png"],
|
179 |
+
# ["examples/basemodel.png", "examples/garment2.png", "examples/result2.png"],
|
180 |
+
# ["examples/basemodel.png", "examples/garment3.png", "examples/result3.png"],
|
181 |
+
# ],
|
182 |
+
# inputs=[reference_image1, reference_image2, reference_image3],
|
183 |
+
# label=None,
|
184 |
+
# )
|
185 |
|
186 |
if __name__ == "__main__":
|
187 |
ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
|