Update app.py
Browse files
app.py
CHANGED
@@ -26,6 +26,9 @@ def set_predictor(image):
|
|
26 |
predictor = SamPredictor(sam)
|
27 |
predictor.set_image(image)
|
28 |
|
|
|
|
|
|
|
29 |
return [image, predictor, 'Done']
|
30 |
|
31 |
|
|
|
26 |
predictor = SamPredictor(sam)
|
27 |
predictor.set_image(image)
|
28 |
|
29 |
+
if device == 'cuda':
|
30 |
+
torch.cuda.empty_cache()
|
31 |
+
|
32 |
return [image, predictor, 'Done']
|
33 |
|
34 |
|