Spaces:
Sleeping
Sleeping
Use high quality PNG showcase images
Browse files
app.py
CHANGED
|
@@ -249,9 +249,9 @@ body, .gradio-container {
|
|
| 249 |
align-items: center;
|
| 250 |
}
|
| 251 |
.tryon-logo {
|
| 252 |
-
width:
|
| 253 |
height: auto;
|
| 254 |
-
max-height:
|
| 255 |
border-radius: 0;
|
| 256 |
object-fit: contain;
|
| 257 |
box-shadow: none;
|
|
@@ -262,7 +262,7 @@ body, .gradio-container {
|
|
| 262 |
flex-direction: column;
|
| 263 |
justify-content: center;
|
| 264 |
align-items: center;
|
| 265 |
-
padding:
|
| 266 |
}
|
| 267 |
.tryon-title {
|
| 268 |
font-size: 32px;
|
|
@@ -273,20 +273,33 @@ body, .gradio-container {
|
|
| 273 |
margin-bottom: 18px;
|
| 274 |
}
|
| 275 |
.prompt-shell {
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 281 |
border-radius: 999px !important;
|
| 282 |
background: #fff !important;
|
| 283 |
-
box-shadow:
|
| 284 |
filter: none !important;
|
| 285 |
-
overflow:
|
| 286 |
}
|
| 287 |
.prompt-shell:focus-within {
|
| 288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
box-shadow: none !important;
|
|
|
|
| 290 |
}
|
| 291 |
.prompt-shell .block,
|
| 292 |
.prompt-shell .wrap,
|
|
@@ -298,18 +311,39 @@ body, .gradio-container {
|
|
| 298 |
box-shadow: none !important;
|
| 299 |
filter: none !important;
|
| 300 |
}
|
| 301 |
-
.prompt-shell,
|
| 302 |
.prompt-shell > *,
|
| 303 |
.prompt-shell .block,
|
| 304 |
-
.prompt-shell .wrap
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 305 |
border-radius: 999px !important;
|
|
|
|
|
|
|
| 306 |
}
|
| 307 |
.prompt-shell img,
|
| 308 |
.prompt-shell video {
|
| 309 |
-
width:
|
| 310 |
-
height:
|
| 311 |
object-fit: cover !important;
|
| 312 |
-
border-radius:
|
| 313 |
border: 2px solid #d9e7ff !important;
|
| 314 |
}
|
| 315 |
.prompt-shell .file-preview,
|
|
@@ -326,50 +360,70 @@ body, .gradio-container {
|
|
| 326 |
}
|
| 327 |
.prompt-shell textarea,
|
| 328 |
.prompt-shell [contenteditable="true"] {
|
| 329 |
-
min-height:
|
| 330 |
border: 0 !important;
|
| 331 |
background: transparent !important;
|
| 332 |
box-shadow: none !important;
|
| 333 |
resize: none !important;
|
| 334 |
color: #111 !important;
|
| 335 |
caret-color: #111 !important;
|
| 336 |
-
font-size:
|
| 337 |
line-height: 1.45 !important;
|
| 338 |
-
padding:
|
| 339 |
}
|
| 340 |
.prompt-shell textarea::placeholder {
|
| 341 |
color: #8b8b8b !important;
|
| 342 |
opacity: 1 !important;
|
| 343 |
}
|
| 344 |
-
.prompt-shell
|
| 345 |
-
.prompt-shell
|
| 346 |
-
.prompt-shell
|
| 347 |
-
|
| 348 |
-
.prompt-shell button[title*="Upload"],
|
| 349 |
-
.prompt-shell button[title*="Submit"] {
|
| 350 |
-
width: 46px !important;
|
| 351 |
-
min-width: 46px !important;
|
| 352 |
-
height: 46px !important;
|
| 353 |
-
padding: 0 !important;
|
| 354 |
-
border-radius: 999px !important;
|
| 355 |
-
border: 0 !important;
|
| 356 |
-
background: #dbeaff !important;
|
| 357 |
-
color: #3677e8 !important;
|
| 358 |
-
font-size: 26px !important;
|
| 359 |
-
box-shadow: none !important;
|
| 360 |
-
display: flex !important;
|
| 361 |
-
align-items: center !important;
|
| 362 |
-
justify-content: center !important;
|
| 363 |
cursor: pointer !important;
|
| 364 |
}
|
| 365 |
-
.prompt-shell
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
.prompt-shell
|
| 369 |
-
.prompt-shell button
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 373 |
}
|
| 374 |
.workspace {
|
| 375 |
max-width: 1180px;
|
|
@@ -432,11 +486,11 @@ body, .gradio-container {
|
|
| 432 |
}
|
| 433 |
@media (max-width: 760px) {
|
| 434 |
.tryon-topbar { top: 14px; left: 16px; }
|
| 435 |
-
.tryon-logo { width:
|
| 436 |
.tryon-hero { padding-top: 104px; }
|
| 437 |
.tryon-title { font-size: 24px; }
|
| 438 |
.prompt-shell { width: min(100%, calc(100vw - 28px)); }
|
| 439 |
-
.prompt-shell textarea, .prompt-shell [contenteditable="true"] { font-size:
|
| 440 |
.showcase-track img { width: 430px; min-width: 430px; }
|
| 441 |
}
|
| 442 |
"""
|
|
@@ -453,13 +507,13 @@ with gr.Blocks(title="JoyAI Virtual Try-On", css=CSS) as demo:
|
|
| 453 |
)
|
| 454 |
|
| 455 |
with gr.Column(elem_classes=["tryon-hero"]):
|
| 456 |
-
gr.HTML('<div class="tryon-title">开始虚拟试穿之旅,
|
| 457 |
prompt_box = gr.MultimodalTextbox(
|
| 458 |
label="",
|
| 459 |
placeholder="描述你想要的试穿效果",
|
| 460 |
file_count="multiple",
|
| 461 |
file_types=["image"],
|
| 462 |
-
lines=
|
| 463 |
max_lines=2,
|
| 464 |
show_label=False,
|
| 465 |
interactive=True,
|
|
|
|
| 249 |
align-items: center;
|
| 250 |
}
|
| 251 |
.tryon-logo {
|
| 252 |
+
width: 273px;
|
| 253 |
height: auto;
|
| 254 |
+
max-height: 129px;
|
| 255 |
border-radius: 0;
|
| 256 |
object-fit: contain;
|
| 257 |
box-shadow: none;
|
|
|
|
| 262 |
flex-direction: column;
|
| 263 |
justify-content: center;
|
| 264 |
align-items: center;
|
| 265 |
+
padding: 112px 20px 34px;
|
| 266 |
}
|
| 267 |
.tryon-title {
|
| 268 |
font-size: 32px;
|
|
|
|
| 273 |
margin-bottom: 18px;
|
| 274 |
}
|
| 275 |
.prompt-shell {
|
| 276 |
+
--block-background-fill: transparent;
|
| 277 |
+
--block-border-color: transparent;
|
| 278 |
+
--input-background-fill: #fff;
|
| 279 |
+
--input-border-color: #d7d7d7;
|
| 280 |
+
--input-shadow: none;
|
| 281 |
+
max-width: 980px;
|
| 282 |
+
width: min(980px, calc(100vw - 640px));
|
| 283 |
+
margin: 0 auto !important;
|
| 284 |
+
min-height: 40px;
|
| 285 |
+
padding: 0 !important;
|
| 286 |
+
border: 1.5px solid #d7d7d7 !important;
|
| 287 |
border-radius: 999px !important;
|
| 288 |
background: #fff !important;
|
| 289 |
+
box-shadow: 8px 10px 22px rgba(0, 0, 0, .12) !important;
|
| 290 |
filter: none !important;
|
| 291 |
+
overflow: visible;
|
| 292 |
}
|
| 293 |
.prompt-shell:focus-within {
|
| 294 |
+
box-shadow: 9px 11px 24px rgba(0, 0, 0, .14) !important;
|
| 295 |
+
}
|
| 296 |
+
.tryon-hero .block:has(.prompt-shell),
|
| 297 |
+
.tryon-hero .form:has(.prompt-shell),
|
| 298 |
+
.tryon-hero .wrap:has(.prompt-shell) {
|
| 299 |
+
border: 0 !important;
|
| 300 |
+
background: transparent !important;
|
| 301 |
box-shadow: none !important;
|
| 302 |
+
filter: none !important;
|
| 303 |
}
|
| 304 |
.prompt-shell .block,
|
| 305 |
.prompt-shell .wrap,
|
|
|
|
| 311 |
box-shadow: none !important;
|
| 312 |
filter: none !important;
|
| 313 |
}
|
|
|
|
| 314 |
.prompt-shell > *,
|
| 315 |
.prompt-shell .block,
|
| 316 |
+
.prompt-shell .wrap,
|
| 317 |
+
.prompt-shell label,
|
| 318 |
+
.prompt-shell fieldset {
|
| 319 |
+
background: transparent !important;
|
| 320 |
+
box-shadow: none !important;
|
| 321 |
+
filter: none !important;
|
| 322 |
+
}
|
| 323 |
+
.prompt-shell textarea,
|
| 324 |
+
.prompt-shell [contenteditable="true"],
|
| 325 |
+
.prompt-shell .input-container,
|
| 326 |
+
.prompt-shell .textarea-container,
|
| 327 |
+
.prompt-shell [data-testid="textbox"],
|
| 328 |
+
.prompt-shell [data-testid="textbox"] > div {
|
| 329 |
+
background: transparent !important;
|
| 330 |
+
}
|
| 331 |
+
.prompt-shell .wrap,
|
| 332 |
+
.prompt-shell .input-container,
|
| 333 |
+
.prompt-shell .textarea-container,
|
| 334 |
+
.prompt-shell [data-testid="textbox"] {
|
| 335 |
+
min-height: 40px !important;
|
| 336 |
+
border: 0 !important;
|
| 337 |
border-radius: 999px !important;
|
| 338 |
+
box-shadow: none !important;
|
| 339 |
+
overflow: visible !important;
|
| 340 |
}
|
| 341 |
.prompt-shell img,
|
| 342 |
.prompt-shell video {
|
| 343 |
+
width: 42px !important;
|
| 344 |
+
height: 42px !important;
|
| 345 |
object-fit: cover !important;
|
| 346 |
+
border-radius: 14px !important;
|
| 347 |
border: 2px solid #d9e7ff !important;
|
| 348 |
}
|
| 349 |
.prompt-shell .file-preview,
|
|
|
|
| 360 |
}
|
| 361 |
.prompt-shell textarea,
|
| 362 |
.prompt-shell [contenteditable="true"] {
|
| 363 |
+
min-height: 38px !important;
|
| 364 |
border: 0 !important;
|
| 365 |
background: transparent !important;
|
| 366 |
box-shadow: none !important;
|
| 367 |
resize: none !important;
|
| 368 |
color: #111 !important;
|
| 369 |
caret-color: #111 !important;
|
| 370 |
+
font-size: 18px !important;
|
| 371 |
line-height: 1.45 !important;
|
| 372 |
+
padding: 8px 74px 5px 64px !important;
|
| 373 |
}
|
| 374 |
.prompt-shell textarea::placeholder {
|
| 375 |
color: #8b8b8b !important;
|
| 376 |
opacity: 1 !important;
|
| 377 |
}
|
| 378 |
+
.prompt-shell button,
|
| 379 |
+
.prompt-shell label,
|
| 380 |
+
.prompt-shell input[type="file"] {
|
| 381 |
+
pointer-events: auto !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 382 |
cursor: pointer !important;
|
| 383 |
}
|
| 384 |
+
.prompt-shell button {
|
| 385 |
+
box-shadow: none !important;
|
| 386 |
+
}
|
| 387 |
+
.prompt-shell .upload-button,
|
| 388 |
+
.prompt-shell .submit-button {
|
| 389 |
+
position: absolute !important;
|
| 390 |
+
top: 50% !important;
|
| 391 |
+
transform: translateY(-50%) !important;
|
| 392 |
+
z-index: 4 !important;
|
| 393 |
+
margin: 0 !important;
|
| 394 |
+
}
|
| 395 |
+
.prompt-shell .upload-button {
|
| 396 |
+
left: 14px !important;
|
| 397 |
+
width: 34px !important;
|
| 398 |
+
min-width: 34px !important;
|
| 399 |
+
height: 34px !important;
|
| 400 |
+
border-radius: 999px !important;
|
| 401 |
+
background: #050505 !important;
|
| 402 |
+
color: #fff !important;
|
| 403 |
+
}
|
| 404 |
+
.prompt-shell .upload-button svg {
|
| 405 |
+
width: 22px !important;
|
| 406 |
+
height: 22px !important;
|
| 407 |
+
color: #fff !important;
|
| 408 |
+
stroke: #fff !important;
|
| 409 |
+
}
|
| 410 |
+
.prompt-shell .submit-button {
|
| 411 |
+
right: 8px !important;
|
| 412 |
+
width: 34px !important;
|
| 413 |
+
min-width: 34px !important;
|
| 414 |
+
height: 34px !important;
|
| 415 |
+
border-radius: 999px !important;
|
| 416 |
+
background: #050505 !important;
|
| 417 |
+
color: #fff !important;
|
| 418 |
+
font-size: 0 !important;
|
| 419 |
+
overflow: hidden !important;
|
| 420 |
+
}
|
| 421 |
+
.prompt-shell .submit-button::before {
|
| 422 |
+
content: "↑";
|
| 423 |
+
display: block;
|
| 424 |
+
font-size: 22px;
|
| 425 |
+
line-height: 1;
|
| 426 |
+
color: #fff;
|
| 427 |
}
|
| 428 |
.workspace {
|
| 429 |
max-width: 1180px;
|
|
|
|
| 486 |
}
|
| 487 |
@media (max-width: 760px) {
|
| 488 |
.tryon-topbar { top: 14px; left: 16px; }
|
| 489 |
+
.tryon-logo { width: 177px; max-height: 84px; }
|
| 490 |
.tryon-hero { padding-top: 104px; }
|
| 491 |
.tryon-title { font-size: 24px; }
|
| 492 |
.prompt-shell { width: min(100%, calc(100vw - 28px)); }
|
| 493 |
+
.prompt-shell textarea, .prompt-shell [contenteditable="true"] { font-size: 17px !important; min-height: 38px !important; padding-left: 58px !important; }
|
| 494 |
.showcase-track img { width: 430px; min-width: 430px; }
|
| 495 |
}
|
| 496 |
"""
|
|
|
|
| 507 |
)
|
| 508 |
|
| 509 |
with gr.Column(elem_classes=["tryon-hero"]):
|
| 510 |
+
gr.HTML('<div class="tryon-title">开始虚拟试穿之旅,上传图像或写指令来看效果</div>')
|
| 511 |
prompt_box = gr.MultimodalTextbox(
|
| 512 |
label="",
|
| 513 |
placeholder="描述你想要的试穿效果",
|
| 514 |
file_count="multiple",
|
| 515 |
file_types=["image"],
|
| 516 |
+
lines=1,
|
| 517 |
max_lines=2,
|
| 518 |
show_label=False,
|
| 519 |
interactive=True,
|