artificial-feelings commited on
Commit
576bca9
1 Parent(s): 2074891

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -4,7 +4,7 @@ import torch
4
  # set device
5
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
6
 
7
- if device.type != 'cuda':
8
  raise ValueError("need to run on GPU")
9
 
10
  class EndpointHandler():
 
4
  # set device
5
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
6
 
7
+ if DEVICE.type != 'cuda':
8
  raise ValueError("need to run on GPU")
9
 
10
  class EndpointHandler():