fix: import spaces pkg instead of decorator
Browse files
app.py
CHANGED
@@ -10,10 +10,9 @@ from sam2.sam2_image_predictor import SAM2ImagePredictor
|
|
10 |
|
11 |
from src.plot_utils import export_mask
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
@GPU()
|
17 |
def predict(model_choice, annotations: Dict[str, Any]):
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
sam2_model = load_model(
|
|
|
10 |
|
11 |
from src.plot_utils import export_mask
|
12 |
|
13 |
+
import spaces
|
14 |
|
15 |
+
@spaces.GPU()
|
|
|
16 |
def predict(model_choice, annotations: Dict[str, Any]):
|
17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
18 |
sam2_model = load_model(
|