Ryan-PR commited on
Commit
b0eef72
·
verified ·
1 Parent(s): 1b2b38c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -319,7 +319,7 @@ def clear_ref_clicks(ref_state):
319
  return Image.fromarray(ref_state["origin_image"])
320
 
321
 
322
- @spaces.GPU()
323
  def track_video(n_frames, video_state):
324
  input_points = video_state["input_points"]
325
  input_labels = video_state["input_labels"]
@@ -398,7 +398,7 @@ def track_video(n_frames, video_state):
398
  return video_file, video_state
399
 
400
 
401
- @spaces.GPU()
402
  def inference_and_return_video(
403
  dilate_radius,
404
  num_inference_steps,
@@ -568,28 +568,28 @@ with gr.Blocks() as demo:
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;
@@ -601,24 +601,24 @@ with gr.Blocks() as demo:
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
  }
 
319
  return Image.fromarray(ref_state["origin_image"])
320
 
321
 
322
+ @spaces.GPU(duration=40)
323
  def track_video(n_frames, video_state):
324
  input_points = video_state["input_points"]
325
  input_labels = video_state["input_labels"]
 
398
  return video_file, video_state
399
 
400
 
401
+ @spaces.GPU(duration=120)
402
  def inference_and_return_video(
403
  dilate_radius,
404
  num_inference_steps,
 
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;
 
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
  }