rolpotamias commited on
Commit
be9e67d
·
verified ·
1 Parent(s): 5a6d9af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -21,6 +21,7 @@ from wilor.utils import recursive_to
21
  from wilor.datasets.vitdet_dataset import ViTDetDataset, DEFAULT_MEAN, DEFAULT_STD
22
  from wilor.utils.renderer import Renderer, cam_crop_to_full
23
  device = torch.device('cpu') #if torch.cuda.is_available() else torch.device('cpu')
 
24
 
25
  LIGHT_PURPLE=(0.25098039, 0.274117647, 0.65882353)
26
 
@@ -33,7 +34,7 @@ model.eval()
33
 
34
  detector = YOLO('./pretrained_models/detector.pt').to(device)
35
 
36
- @spaces.GPU(enable_queue=True)
37
  def run_wilow_model(image, conf, IoU_threshold=0.5):
38
  img_cv2 = image[...,::-1]
39
  img_vis = image.copy()
@@ -180,4 +181,4 @@ with gr.Blocks(title="WiLoR: End-to-end 3D hand localization and reconstruction
180
  ],
181
  inputs=input_image)
182
 
183
- demo.queue().launch(debug=True)
 
21
  from wilor.datasets.vitdet_dataset import ViTDetDataset, DEFAULT_MEAN, DEFAULT_STD
22
  from wilor.utils.renderer import Renderer, cam_crop_to_full
23
  device = torch.device('cpu') #if torch.cuda.is_available() else torch.device('cpu')
24
+ print('CUDA AVAILABLE', torch.cuda.is_available())
25
 
26
  LIGHT_PURPLE=(0.25098039, 0.274117647, 0.65882353)
27
 
 
34
 
35
  detector = YOLO('./pretrained_models/detector.pt').to(device)
36
 
37
+ @spaces.GPU()
38
  def run_wilow_model(image, conf, IoU_threshold=0.5):
39
  img_cv2 = image[...,::-1]
40
  img_vis = image.copy()
 
181
  ],
182
  inputs=input_image)
183
 
184
+ demo.launch(debug=True)