Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -239,6 +239,37 @@ HEADER = """
|
|
| 239 |
"""
|
| 240 |
def app_gradio():
|
| 241 |
custom_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
button.primary-btn {
|
| 243 |
background: linear-gradient(135deg, #2541b2 0%, #1a237e 100%);
|
| 244 |
transition: all 0.3s ease;
|
|
@@ -308,7 +339,7 @@ def app_gradio():
|
|
| 308 |
)
|
| 309 |
|
| 310 |
with gr.Row():
|
| 311 |
-
with gr.Column(scale=1, min_width=
|
| 312 |
with gr.Row():
|
| 313 |
image_path = gr.Image(
|
| 314 |
type="filepath",
|
|
@@ -322,13 +353,13 @@ def app_gradio():
|
|
| 322 |
)
|
| 323 |
|
| 324 |
with gr.Row():
|
| 325 |
-
with gr.Column(scale=1, min_width=
|
| 326 |
cloth_image = gr.Image(
|
| 327 |
interactive=True,
|
| 328 |
label="Select Garment",
|
| 329 |
type="filepath"
|
| 330 |
)
|
| 331 |
-
with gr.Column(scale=1, min_width=
|
| 332 |
gr.Markdown(
|
| 333 |
'''
|
| 334 |
<div style="color: white; background: linear-gradient(135deg, #2541b2 0%, #1a237e 100%);
|
|
@@ -399,7 +430,7 @@ def app_gradio():
|
|
| 399 |
value="input & result",
|
| 400 |
)
|
| 401 |
|
| 402 |
-
with gr.Column(scale=2, min_width=
|
| 403 |
result_image = gr.Image(
|
| 404 |
interactive=False,
|
| 405 |
label="Virtual Try-On Result"
|
|
|
|
| 239 |
"""
|
| 240 |
def app_gradio():
|
| 241 |
custom_css = """
|
| 242 |
+
@media (max-width: 768px) {
|
| 243 |
+
.gr-column {
|
| 244 |
+
width: 100% !important;
|
| 245 |
+
padding: 0.5rem;
|
| 246 |
+
}
|
| 247 |
+
.gr-row {
|
| 248 |
+
flex-direction: column !important;
|
| 249 |
+
}
|
| 250 |
+
.container {
|
| 251 |
+
margin: 0.5rem !important;
|
| 252 |
+
padding: 1rem !important;
|
| 253 |
+
}
|
| 254 |
+
button.primary-btn {
|
| 255 |
+
padding: 0.8rem 1rem;
|
| 256 |
+
font-size: 1rem;
|
| 257 |
+
}
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
@media (max-width: 480px) {
|
| 261 |
+
.gr-slider, .gr-radio-group, .gr-markdown, .gr-accordion {
|
| 262 |
+
font-size: 0.9rem !important;
|
| 263 |
+
padding: 0.5rem;
|
| 264 |
+
}
|
| 265 |
+
button.primary-btn {
|
| 266 |
+
font-size: 0.8rem;
|
| 267 |
+
padding: 0.6rem 0.8rem;
|
| 268 |
+
}
|
| 269 |
+
.gr-form {
|
| 270 |
+
margin: 0.5rem;
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
button.primary-btn {
|
| 274 |
background: linear-gradient(135deg, #2541b2 0%, #1a237e 100%);
|
| 275 |
transition: all 0.3s ease;
|
|
|
|
| 339 |
)
|
| 340 |
|
| 341 |
with gr.Row():
|
| 342 |
+
with gr.Column(scale=1, min_width="auto"):
|
| 343 |
with gr.Row():
|
| 344 |
image_path = gr.Image(
|
| 345 |
type="filepath",
|
|
|
|
| 353 |
)
|
| 354 |
|
| 355 |
with gr.Row():
|
| 356 |
+
with gr.Column(scale=1, min_width="auto"):
|
| 357 |
cloth_image = gr.Image(
|
| 358 |
interactive=True,
|
| 359 |
label="Select Garment",
|
| 360 |
type="filepath"
|
| 361 |
)
|
| 362 |
+
with gr.Column(scale=1, min_width="auto"):
|
| 363 |
gr.Markdown(
|
| 364 |
'''
|
| 365 |
<div style="color: white; background: linear-gradient(135deg, #2541b2 0%, #1a237e 100%);
|
|
|
|
| 430 |
value="input & result",
|
| 431 |
)
|
| 432 |
|
| 433 |
+
with gr.Column(scale=2, min_width="auto"):
|
| 434 |
result_image = gr.Image(
|
| 435 |
interactive=False,
|
| 436 |
label="Virtual Try-On Result"
|