lixiang46
commited on
Commit
·
01db67e
1
Parent(s):
466b872
test
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title: Kolors Visual
|
| 3 |
emoji: 👕
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: gray
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Kolors Visual Try-on
|
| 3 |
emoji: 👕
|
| 4 |
colorFrom: purple
|
| 5 |
colorTo: gray
|
app.py
CHANGED
|
@@ -52,11 +52,15 @@ human_list_path = [os.path.join(example_path,"human",human) for human in human_l
|
|
| 52 |
css="""
|
| 53 |
#col-left {
|
| 54 |
margin: 0 auto;
|
| 55 |
-
max-width:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
#col-right {
|
| 58 |
margin: 0 auto;
|
| 59 |
-
max-width:
|
| 60 |
}
|
| 61 |
#button {
|
| 62 |
color: blue;
|
|
@@ -71,7 +75,7 @@ def load_description(fp):
|
|
| 71 |
with gr.Blocks(css=css) as Tryon:
|
| 72 |
gr.HTML(load_description("assets/title.md"))
|
| 73 |
with gr.Row():
|
| 74 |
-
with gr.Column():
|
| 75 |
imgs = gr.Image(label="Person image", sources='upload', type="numpy")
|
| 76 |
# category = gr.Dropdown(label="Garment category", choices=['upper_body', 'lower_body', 'dresses'], value="upper_body")
|
| 77 |
example = gr.Examples(
|
|
@@ -79,13 +83,13 @@ with gr.Blocks(css=css) as Tryon:
|
|
| 79 |
examples_per_page=10,
|
| 80 |
examples=human_list_path
|
| 81 |
)
|
| 82 |
-
with gr.Column():
|
| 83 |
garm_img = gr.Image(label="Garment image", sources='upload', type="numpy")
|
| 84 |
example = gr.Examples(
|
| 85 |
inputs=garm_img,
|
| 86 |
examples_per_page=10,
|
| 87 |
examples=garm_list_path)
|
| 88 |
-
with gr.Column():
|
| 89 |
image_out = gr.Image(label="Output", show_share_button=False)
|
| 90 |
seed_used = gr.Number(label="Seed Used")
|
| 91 |
try_button = gr.Button(value="Try-on", elem_id="button")
|
|
|
|
| 52 |
css="""
|
| 53 |
#col-left {
|
| 54 |
margin: 0 auto;
|
| 55 |
+
max-width: 500px;
|
| 56 |
+
}
|
| 57 |
+
#col-mid {
|
| 58 |
+
margin: 0 auto;
|
| 59 |
+
max-width: 500px;
|
| 60 |
}
|
| 61 |
#col-right {
|
| 62 |
margin: 0 auto;
|
| 63 |
+
max-width: 700px;
|
| 64 |
}
|
| 65 |
#button {
|
| 66 |
color: blue;
|
|
|
|
| 75 |
with gr.Blocks(css=css) as Tryon:
|
| 76 |
gr.HTML(load_description("assets/title.md"))
|
| 77 |
with gr.Row():
|
| 78 |
+
with gr.Column(elem_id = "col-left"):
|
| 79 |
imgs = gr.Image(label="Person image", sources='upload', type="numpy")
|
| 80 |
# category = gr.Dropdown(label="Garment category", choices=['upper_body', 'lower_body', 'dresses'], value="upper_body")
|
| 81 |
example = gr.Examples(
|
|
|
|
| 83 |
examples_per_page=10,
|
| 84 |
examples=human_list_path
|
| 85 |
)
|
| 86 |
+
with gr.Column(elem_id = "col-mid"):
|
| 87 |
garm_img = gr.Image(label="Garment image", sources='upload', type="numpy")
|
| 88 |
example = gr.Examples(
|
| 89 |
inputs=garm_img,
|
| 90 |
examples_per_page=10,
|
| 91 |
examples=garm_list_path)
|
| 92 |
+
with gr.Column(elem_id = "col-right"):
|
| 93 |
image_out = gr.Image(label="Output", show_share_button=False)
|
| 94 |
seed_used = gr.Number(label="Seed Used")
|
| 95 |
try_button = gr.Button(value="Try-on", elem_id="button")
|