Miroslav Purkrabek commited on
Commit
3f60de0
·
1 Parent(s): efdc71d

reverse to GPU

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,7 +40,7 @@ def _parse_yaml_config(yaml_path: Path) -> DotDict:
40
  return DotDict(cfg)
41
 
42
  def load_models(bmp_config):
43
- device = 'cpu'
44
 
45
  global det_model, pose_model, sam2_model
46
 
@@ -64,7 +64,7 @@ def load_models(bmp_config):
64
 
65
  return det_model, pose_model, sam2_model
66
 
67
- # @spaces.GPU(duration=60)
68
  def process_image_with_BMP(
69
  img: np.ndarray
70
  ) -> tuple[np.ndarray, np.ndarray]:
 
40
  return DotDict(cfg)
41
 
42
  def load_models(bmp_config):
43
+ device = 'cuda:0'
44
 
45
  global det_model, pose_model, sam2_model
46
 
 
64
 
65
  return det_model, pose_model, sam2_model
66
 
67
+ @spaces.GPU(duration=60)
68
  def process_image_with_BMP(
69
  img: np.ndarray
70
  ) -> tuple[np.ndarray, np.ndarray]: