xmrt commited on
Commit
90febb1
·
1 Parent(s): b28330f
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -91,12 +91,13 @@ def poses(photo, check):
91
  def run():
92
  #https://github.com/open-mmlab/mmpose/blob/main/docs/en/user_guides/inference.md
93
  available_methods = ["Estimate human 2d poses", "Estimate human 2d hand poses", "Estimate human 3d poses"]
 
 
94
 
95
  webcam = gr.Interface(
96
  fn=poses,
97
- inputs= [gr.Video(source="webcam"),
98
- gr.CheckboxGroup(available_methods, label="Methods", type="value", info="Select the model(s) you want")],
99
- outputs = gr.Video(format='mp4'),
100
  title = 'Pose estimation',
101
  description = 'Pose estimation on video',
102
  allow_flagging=False
@@ -104,9 +105,8 @@ def run():
104
 
105
  file = gr.Interface(
106
  poses,
107
- inputs = [gr.Video(source="upload"),
108
- gr.CheckboxGroup(available_methods, label="Methods", type="value", info="Select the model(s) you want")],
109
- outputs = gr.Video(format='mp4'),
110
  allow_flagging=False
111
  )
112
 
 
91
  def run():
92
  #https://github.com/open-mmlab/mmpose/blob/main/docs/en/user_guides/inference.md
93
  available_methods = ["Estimate human 2d poses", "Estimate human 2d hand poses", "Estimate human 3d poses"]
94
+ check_web = gr.CheckboxGroup(choices = available_methods, label="Methods", type="value", info="Select the model(s) you want")
95
+ check_file = gr.CheckboxGroup(choices = available_methods, label="Methods", type="value", info="Select the model(s) you want")
96
 
97
  webcam = gr.Interface(
98
  fn=poses,
99
+ inputs= [gr.Video(source="webcam"), check_web],
100
+ outputs = gr.Video(),
 
101
  title = 'Pose estimation',
102
  description = 'Pose estimation on video',
103
  allow_flagging=False
 
105
 
106
  file = gr.Interface(
107
  poses,
108
+ inputs = [gr.Video(source="upload"), check_file],
109
+ outputs = gr.PlayableVideo(),
 
110
  allow_flagging=False
111
  )
112