lichih commited on
Commit
3ae3a9f
·
verified ·
1 Parent(s): b0f9d98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ class Classifier:
25
  self, model_path="Litton-7type-visual-landscape-model.pth", device=None
26
  ):
27
  if device is None:
28
- self.device = "cuda:0" if torch.cuda.is_available() else "cpu"
29
  else:
30
  self.device = device
31
 
 
25
  self, model_path="Litton-7type-visual-landscape-model.pth", device=None
26
  ):
27
  if device is None:
28
+ self.device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
29
  else:
30
  self.device = device
31