kbrodt commited on
Commit
c6678f9
1 Parent(s): bb3d29b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -131,8 +131,9 @@ def main():
131
  return str(mesh_path)
132
 
133
  examples = []
 
134
  for img_path in Path("./data/images").glob("*"):
135
- examples.append([str(img_path), True, True, True, True])
136
 
137
  demo = gr.Interface(
138
  fn=pose,
@@ -140,7 +141,7 @@ def main():
140
  gr.Image(type="filepath", label="Image"),
141
  gr.Checkbox(value=True, label="Bone lenghts"),
142
  gr.Checkbox(value=True, label="Foreshortening"),
143
- gr.Checkbox(value=True, label="Self-contacts", interactive=torch.cuda.is_available()),
144
  gr.Checkbox(value=True, label="Pose naturalness"),
145
  ],
146
  outputs=gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="SMPL 3D pose"),
 
131
  return str(mesh_path)
132
 
133
  examples = []
134
+ use_contacts = torch.cuda.is_available()
135
  for img_path in Path("./data/images").glob("*"):
136
+ examples.append([str(img_path), True, True, use_contacts, True])
137
 
138
  demo = gr.Interface(
139
  fn=pose,
 
141
  gr.Image(type="filepath", label="Image"),
142
  gr.Checkbox(value=True, label="Bone lenghts"),
143
  gr.Checkbox(value=True, label="Foreshortening"),
144
+ gr.Checkbox(value=use_contacts, label="Self-contacts", interactive=use_contacts),
145
  gr.Checkbox(value=True, label="Pose naturalness"),
146
  ],
147
  outputs=gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="SMPL 3D pose"),