fantaxy commited on
Commit
dd53d2c
1 Parent(s): eb4a36b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -29
app.py CHANGED
@@ -26,38 +26,39 @@ class App:
26
  return [gr.Image(label="Input Image", value=input_img, type="filepath", scale=5),
27
  gr.Video(label="Input Aligned Pose Video", value=input_pose_vid, scale=5)]
28
 
29
- def musepose_demo(self):
30
- with gr.Blocks() as demo:
31
- md_header = self.header()
32
- with gr.Tabs():
33
- with gr.TabItem('1: Pose Alignment'):
34
- with gr.Row():
35
- with gr.Column(scale=3):
36
- img_pose_input = gr.Image(label="Input Image", type="filepath", scale=5)
37
- vid_dance_input = gr.Video(label="Input Dance Video", max_length=10, scale=5) # Changed max_length to 10
38
- with gr.Column(scale=3):
39
- vid_dance_output = gr.Video(label="Aligned Pose Output", scale=5, interactive=False)
40
- vid_dance_output_demo = gr.Video(label="Aligned Pose Output Demo", scale=5)
41
- # Rest of the column setup remains the same
42
- with gr.Column(scale=3):
43
- # column settings remain the same
44
-
45
- # button settings and event handlers remain the same
46
-
47
- with gr.TabItem('2: MusePose Inference'):
48
- with gr.Row():
49
- with gr.Column(scale=3):
50
- img_musepose_input = gr.Image(label="Input Image", type="filepath", scale=5)
51
- vid_pose_input = gr.Video(label="Input Aligned Pose Video", max_length=10, scale=5) # Changed max_length to 10
52
- with gr.Column(scale=3):
53
- vid_output = gr.Video(label="MusePose Output", scale=5)
54
- vid_output_demo = gr.Video(label="MusePose Output Demo", scale=5)
55
-
56
- # Rest of the settings remains the same
57
 
58
  # Event handler and button settings remain unchanged
59
 
60
- return demo
 
61
 
62
  @staticmethod
63
  def header():
 
26
  return [gr.Image(label="Input Image", value=input_img, type="filepath", scale=5),
27
  gr.Video(label="Input Aligned Pose Video", value=input_pose_vid, scale=5)]
28
 
29
+ def musepose_demo(self):
30
+ with gr.Blocks() as demo:
31
+ md_header = self.header()
32
+ with gr.Tabs():
33
+ with gr.TabItem('1: Pose Alignment'):
34
+ with gr.Row():
35
+ with gr.Column(scale=3):
36
+ img_pose_input = gr.Image(label="Input Image", type="filepath", scale=5)
37
+ vid_dance_input = gr.Video(label="Input Dance Video", max_length=10, scale=5) # Changed max_length to 10
38
+ with gr.Column(scale=3):
39
+ vid_dance_output = gr.Video(label="Aligned Pose Output", scale=5, interactive=False)
40
+ vid_dance_output_demo = gr.Video(label="Aligned Pose Output Demo", scale=5)
41
+ # Rest of the column setup remains the same
42
+ with gr.Column(scale=3):
43
+ # Column settings remain the same
44
+
45
+ # Button settings and event handlers remain the same
46
+
47
+ with gr.TabItem('2: MusePose Inference'):
48
+ with gr.Row():
49
+ with gr.Column(scale=3):
50
+ img_musepose_input = gr.Image(label="Input Image", type="filepath", scale=5)
51
+ vid_pose_input = gr.Video(label="Input Aligned Pose Video", max_length=10, scale=5) # Changed max_length to 10
52
+ with gr.Column(scale=3):
53
+ vid_output = gr.Video(label="MusePose Output", scale=5)
54
+ vid_output_demo = gr.Video(label="MusePose Output Demo", scale=5)
55
+
56
+ # Rest of the settings remains the same
57
 
58
  # Event handler and button settings remain unchanged
59
 
60
+ return demo
61
+
62
 
63
  @staticmethod
64
  def header():