Spaces:
Runtime error
Runtime error
lixiang46
commited on
Commit
•
4db4e89
1
Parent(s):
f14d8dd
add emle_id
Browse files
app.py
CHANGED
@@ -70,6 +70,10 @@ css="""
|
|
70 |
margin: 0 auto;
|
71 |
max-width: 520px;
|
72 |
}
|
|
|
|
|
|
|
|
|
73 |
#button {
|
74 |
color: blue;
|
75 |
}
|
@@ -118,18 +122,25 @@ with gr.Blocks(css=css) as Tryon:
|
|
118 |
|
119 |
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon')
|
120 |
|
121 |
-
gr.
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
|
134 |
ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
|
135 |
print("ip address", ip)
|
|
|
70 |
margin: 0 auto;
|
71 |
max-width: 520px;
|
72 |
}
|
73 |
+
#col-showcase {
|
74 |
+
margin: 0 auto;
|
75 |
+
max-width: 900px;
|
76 |
+
}
|
77 |
#button {
|
78 |
color: blue;
|
79 |
}
|
|
|
122 |
|
123 |
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon')
|
124 |
|
125 |
+
gr.HTML("""
|
126 |
+
<div style="display: flex; justify-content: center; align-items: center; text-align: center;">
|
127 |
+
<div>
|
128 |
+
<h1>Show Case</h1>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
""")
|
132 |
+
with gr.Column(elem_id = "col-showcase"):
|
133 |
+
with gr.Row():
|
134 |
+
image1 = gr.Image(label="Model", scale=1, value="assets/examples/model1.png")
|
135 |
+
image2 = gr.Image(label="Garment", scale=1, value="assets/examples/garment1.png")
|
136 |
+
image3 = gr.Image(label="Result", scale=1, value="assets/examples/result1.png")
|
137 |
+
gr.Examples(
|
138 |
+
examples=[
|
139 |
+
["assets/examples/model1.png", "assets/examples/garment1.png", "assets/examples/result1.png"]
|
140 |
+
],
|
141 |
+
inputs=[image1, image2, image3],
|
142 |
+
label=None,
|
143 |
+
)
|
144 |
|
145 |
ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
|
146 |
print("ip address", ip)
|