dawn17 commited on
Commit
93dbad8
1 Parent(s): 424cf64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -56,7 +56,7 @@ class Gradio:
56
 
57
  if os.path.isfile(model_path):
58
  model.load_state_dict(
59
- torch.load(model_path)["model_state_dict"], strict=False
60
  )
61
 
62
  return model
 
56
 
57
  if os.path.isfile(model_path):
58
  model.load_state_dict(
59
+ torch.load(model_path), strict=False, map_location=self.device
60
  )
61
 
62
  return model