Update app.py
Browse files
app.py
CHANGED
|
@@ -515,7 +515,64 @@ text = """
|
|
| 515 |
|
| 516 |
pipe, image_predictor, video_predictor = get_pipe_image_and_video_predictor()
|
| 517 |
|
| 518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
video_state = gr.State(
|
| 520 |
{
|
| 521 |
"origin_images": None,
|
|
@@ -567,63 +624,6 @@ with gr.Blocks() as demo:
|
|
| 567 |
elem_id="my-video",
|
| 568 |
)
|
| 569 |
|
| 570 |
-
demo.css = """
|
| 571 |
-
.my-btn {
|
| 572 |
-
width: 60% !important;
|
| 573 |
-
margin: 0 auto;
|
| 574 |
-
}
|
| 575 |
-
.my-video1 {
|
| 576 |
-
width: 60% !important;
|
| 577 |
-
height: 35% !important;
|
| 578 |
-
margin: 0 auto;
|
| 579 |
-
}
|
| 580 |
-
.my-video {
|
| 581 |
-
width: 60% !important;
|
| 582 |
-
height: 35% !important;
|
| 583 |
-
margin: 0 auto;
|
| 584 |
-
}
|
| 585 |
-
.my-md {
|
| 586 |
-
margin: 0 auto;
|
| 587 |
-
}
|
| 588 |
-
.my-btn2 {
|
| 589 |
-
width: 60% !important;
|
| 590 |
-
margin: 0 auto;
|
| 591 |
-
}
|
| 592 |
-
.my-btn2 button {
|
| 593 |
-
width: 120px !important;
|
| 594 |
-
max-width: 120px !important;
|
| 595 |
-
min-width: 120px !important;
|
| 596 |
-
height: 70px !important;
|
| 597 |
-
max-height: 70px !important;
|
| 598 |
-
min-height: 70px !important;
|
| 599 |
-
margin: 8px !important;
|
| 600 |
-
border-radius: 8px !important;
|
| 601 |
-
overflow: hidden !important;
|
| 602 |
-
white-space: normal !important;
|
| 603 |
-
}
|
| 604 |
-
.my-btn3 {
|
| 605 |
-
width: 60% !important;
|
| 606 |
-
margin: 0 auto;
|
| 607 |
-
}
|
| 608 |
-
.ref_title {
|
| 609 |
-
text-align: center;
|
| 610 |
-
}
|
| 611 |
-
.ref-image {
|
| 612 |
-
width: 60% !important;
|
| 613 |
-
height: 35% !important;
|
| 614 |
-
margin: 0 auto;
|
| 615 |
-
}
|
| 616 |
-
.ref-mask {
|
| 617 |
-
width: 60% !important;
|
| 618 |
-
height: 35% !important;
|
| 619 |
-
margin: 0 auto;
|
| 620 |
-
}
|
| 621 |
-
.mesh-row {
|
| 622 |
-
width: 60% !important;
|
| 623 |
-
margin: 0 auto;
|
| 624 |
-
}
|
| 625 |
-
"""
|
| 626 |
-
|
| 627 |
with gr.Row(elem_id="my-btn"):
|
| 628 |
point_prompt = gr.Radio(
|
| 629 |
["Positive", "Negative"], label="Click Type", value="Positive"
|
|
|
|
| 515 |
|
| 516 |
pipe, image_predictor, video_predictor = get_pipe_image_and_video_predictor()
|
| 517 |
|
| 518 |
+
css = """
|
| 519 |
+
.my-btn {
|
| 520 |
+
width: 60% !important;
|
| 521 |
+
margin: 0 auto;
|
| 522 |
+
}
|
| 523 |
+
.my-video1 {
|
| 524 |
+
width: 60% !important;
|
| 525 |
+
height: 35% !important;
|
| 526 |
+
margin: 0 auto;
|
| 527 |
+
}
|
| 528 |
+
.my-video {
|
| 529 |
+
width: 60% !important;
|
| 530 |
+
height: 35% !important;
|
| 531 |
+
margin: 0 auto;
|
| 532 |
+
}
|
| 533 |
+
.my-md {
|
| 534 |
+
margin: 0 auto;
|
| 535 |
+
}
|
| 536 |
+
.my-btn2 {
|
| 537 |
+
width: 60% !important;
|
| 538 |
+
margin: 0 auto;
|
| 539 |
+
}
|
| 540 |
+
.my-btn2 button {
|
| 541 |
+
width: 120px !important;
|
| 542 |
+
max-width: 120px !important;
|
| 543 |
+
min-width: 120px !important;
|
| 544 |
+
height: 70px !important;
|
| 545 |
+
max-height: 70px !important;
|
| 546 |
+
min-height: 70px !important;
|
| 547 |
+
margin: 8px !important;
|
| 548 |
+
border-radius: 8px !important;
|
| 549 |
+
overflow: hidden !important;
|
| 550 |
+
white-space: normal !important;
|
| 551 |
+
}
|
| 552 |
+
.my-btn3 {
|
| 553 |
+
width: 60% !important;
|
| 554 |
+
margin: 0 auto;
|
| 555 |
+
}
|
| 556 |
+
.ref_title {
|
| 557 |
+
text-align: center;
|
| 558 |
+
}
|
| 559 |
+
.ref-image {
|
| 560 |
+
width: 60% !important;
|
| 561 |
+
height: 35% !important;
|
| 562 |
+
margin: 0 auto;
|
| 563 |
+
}
|
| 564 |
+
.ref-mask {
|
| 565 |
+
width: 60% !important;
|
| 566 |
+
height: 35% !important;
|
| 567 |
+
margin: 0 auto;
|
| 568 |
+
}
|
| 569 |
+
.mesh-row {
|
| 570 |
+
width: 60% !important;
|
| 571 |
+
margin: 0 auto;
|
| 572 |
+
}
|
| 573 |
+
"""
|
| 574 |
+
|
| 575 |
+
with gr.Blocks(css=css) as demo:
|
| 576 |
video_state = gr.State(
|
| 577 |
{
|
| 578 |
"origin_images": None,
|
|
|
|
| 624 |
elem_id="my-video",
|
| 625 |
)
|
| 626 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 627 |
with gr.Row(elem_id="my-btn"):
|
| 628 |
point_prompt = gr.Radio(
|
| 629 |
["Positive", "Negative"], label="Click Type", value="Positive"
|