captchaboy commited on
Commit
5a2cf32
1 Parent(s): 3da079f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ def get_model(config):
32
 
33
  def load(model, file, device=None, strict=True):
34
  if device is None: device = 'cpu'
35
- elif isinstance(device, int): device = torch.device('cuda', device)
36
  assert os.path.isfile(file)
37
  state = torch.load(file, map_location=device)
38
  if set(state.keys()) == {'model', 'opt'}:
 
32
 
33
  def load(model, file, device=None, strict=True):
34
  if device is None: device = 'cpu'
35
+ elif isinstance(device, int): device = torch.device('cuda', 0)
36
  assert os.path.isfile(file)
37
  state = torch.load(file, map_location=device)
38
  if set(state.keys()) == {'model', 'opt'}: