vmoras commited on
Commit
28bb343
1 Parent(s): 5efdfc5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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