Update app.py
Browse files
app.py
CHANGED
|
@@ -514,71 +514,9 @@ text = """
|
|
| 514 |
</div>
|
| 515 |
"""
|
| 516 |
|
| 517 |
-
css = """
|
| 518 |
-
.gradio-container {
|
| 519 |
-
max-width: 60% !important;
|
| 520 |
-
margin: 0 auto !important;
|
| 521 |
-
}
|
| 522 |
-
|
| 523 |
-
#my-btn {
|
| 524 |
-
width: 60% !important;
|
| 525 |
-
margin: 0 auto;
|
| 526 |
-
}
|
| 527 |
-
#my-video1 {
|
| 528 |
-
width: 60% !important;
|
| 529 |
-
height: 35% !important;
|
| 530 |
-
margin: 0 auto;
|
| 531 |
-
}
|
| 532 |
-
#my-video {
|
| 533 |
-
width: 60% !important;
|
| 534 |
-
height: 35% !important;
|
| 535 |
-
margin: 0 auto;
|
| 536 |
-
}
|
| 537 |
-
#my-md {
|
| 538 |
-
margin: 0 auto;
|
| 539 |
-
}
|
| 540 |
-
#my-btn2 {
|
| 541 |
-
width: 60% !important;
|
| 542 |
-
margin: 0 auto;
|
| 543 |
-
}
|
| 544 |
-
#my-btn2 button {
|
| 545 |
-
width: 120px !important;
|
| 546 |
-
max-width: 120px !important;
|
| 547 |
-
min-width: 120px !important;
|
| 548 |
-
height: 70px !important;
|
| 549 |
-
max-height: 70px !important;
|
| 550 |
-
min-height: 70px !important;
|
| 551 |
-
margin: 8px !important;
|
| 552 |
-
border-radius: 8px !important;
|
| 553 |
-
overflow: hidden !important;
|
| 554 |
-
white-space: normal !important;
|
| 555 |
-
}
|
| 556 |
-
#my-btn3 {
|
| 557 |
-
width: 60% !important;
|
| 558 |
-
margin: 0 auto;
|
| 559 |
-
}
|
| 560 |
-
#ref_title {
|
| 561 |
-
text-align: center;
|
| 562 |
-
}
|
| 563 |
-
#ref-image {
|
| 564 |
-
width: 60% !important;
|
| 565 |
-
height: 35% !important;
|
| 566 |
-
margin: 0 auto;
|
| 567 |
-
}
|
| 568 |
-
#ref-mask {
|
| 569 |
-
width: 60% !important;
|
| 570 |
-
height: 35% !important;
|
| 571 |
-
margin: 0 auto;
|
| 572 |
-
}
|
| 573 |
-
#mesh-row {
|
| 574 |
-
width: 60% !important;
|
| 575 |
-
margin: 0 auto;
|
| 576 |
-
}
|
| 577 |
-
"""
|
| 578 |
-
|
| 579 |
pipe, image_predictor, video_predictor = get_pipe_image_and_video_predictor()
|
| 580 |
|
| 581 |
-
with gr.Blocks(
|
| 582 |
video_state = gr.State(
|
| 583 |
{
|
| 584 |
"origin_images": None,
|
|
@@ -604,6 +542,68 @@ with gr.Blocks(css=css) as demo:
|
|
| 604 |
}
|
| 605 |
)
|
| 606 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 607 |
gr.Markdown(f"<div style='text-align:center;'>{text}</div>")
|
| 608 |
|
| 609 |
with gr.Column():
|
|
@@ -782,5 +782,3 @@ with gr.Blocks(css=css) as demo:
|
|
| 782 |
)
|
| 783 |
|
| 784 |
demo.launch()
|
| 785 |
-
|
| 786 |
-
|
|
|
|
| 514 |
</div>
|
| 515 |
"""
|
| 516 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 517 |
pipe, image_predictor, video_predictor = get_pipe_image_and_video_predictor()
|
| 518 |
|
| 519 |
+
with gr.Blocks() as demo:
|
| 520 |
video_state = gr.State(
|
| 521 |
{
|
| 522 |
"origin_images": None,
|
|
|
|
| 542 |
}
|
| 543 |
)
|
| 544 |
|
| 545 |
+
demo.css = """
|
| 546 |
+
.gradio-container {
|
| 547 |
+
max-width: 60% !important;
|
| 548 |
+
margin: 0 auto !important;
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
#my-btn {
|
| 552 |
+
width: 60% !important;
|
| 553 |
+
margin: 0 auto;
|
| 554 |
+
}
|
| 555 |
+
#my-video1 {
|
| 556 |
+
width: 60% !important;
|
| 557 |
+
height: 35% !important;
|
| 558 |
+
margin: 0 auto;
|
| 559 |
+
}
|
| 560 |
+
#my-video {
|
| 561 |
+
width: 60% !important;
|
| 562 |
+
height: 35% !important;
|
| 563 |
+
margin: 0 auto;
|
| 564 |
+
}
|
| 565 |
+
#my-md {
|
| 566 |
+
margin: 0 auto;
|
| 567 |
+
}
|
| 568 |
+
#my-btn2 {
|
| 569 |
+
width: 60% !important;
|
| 570 |
+
margin: 0 auto;
|
| 571 |
+
}
|
| 572 |
+
#my-btn2 button {
|
| 573 |
+
width: 120px !important;
|
| 574 |
+
max-width: 120px !important;
|
| 575 |
+
min-width: 120px !important;
|
| 576 |
+
height: 70px !important;
|
| 577 |
+
max-height: 70px !important;
|
| 578 |
+
min-height: 70px !important;
|
| 579 |
+
margin: 8px !important;
|
| 580 |
+
border-radius: 8px !important;
|
| 581 |
+
overflow: hidden !important;
|
| 582 |
+
white-space: normal !important;
|
| 583 |
+
}
|
| 584 |
+
#my-btn3 {
|
| 585 |
+
width: 60% !important;
|
| 586 |
+
margin: 0 auto;
|
| 587 |
+
}
|
| 588 |
+
#ref_title {
|
| 589 |
+
text-align: center;
|
| 590 |
+
}
|
| 591 |
+
#ref-image {
|
| 592 |
+
width: 60% !important;
|
| 593 |
+
height: 35% !important;
|
| 594 |
+
margin: 0 auto;
|
| 595 |
+
}
|
| 596 |
+
#ref-mask {
|
| 597 |
+
width: 60% !important;
|
| 598 |
+
height: 35% !important;
|
| 599 |
+
margin: 0 auto;
|
| 600 |
+
}
|
| 601 |
+
#mesh-row {
|
| 602 |
+
width: 60% !important;
|
| 603 |
+
margin: 0 auto;
|
| 604 |
+
}
|
| 605 |
+
"""
|
| 606 |
+
|
| 607 |
gr.Markdown(f"<div style='text-align:center;'>{text}</div>")
|
| 608 |
|
| 609 |
with gr.Column():
|
|
|
|
| 782 |
)
|
| 783 |
|
| 784 |
demo.launch()
|
|
|
|
|
|