feat: specify CUDA
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ choice_mapping = {
|
|
23 |
@spaces.GPU
|
24 |
def predict(model_choice: str, annotations, image):
|
25 |
config_file, ckpt_path = choice_mapping[str(model_choice)]
|
26 |
-
sam2_model = build_sam2(config_file, ckpt_path, device="
|
27 |
predictor = SAM2ImagePredictor(sam2_model)
|
28 |
predictor.set_image(image)
|
29 |
coordinates = np.array(
|
|
|
23 |
@spaces.GPU
|
24 |
def predict(model_choice: str, annotations, image):
|
25 |
config_file, ckpt_path = choice_mapping[str(model_choice)]
|
26 |
+
sam2_model = build_sam2(config_file, ckpt_path, device="cuda")
|
27 |
predictor = SAM2ImagePredictor(sam2_model)
|
28 |
predictor.set_image(image)
|
29 |
coordinates = np.array(
|