parneetsingh022 commited on
Commit
b41a5c0
·
verified ·
1 Parent(s): b0471d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -44,7 +44,8 @@ class CustomModel(nn.Module):
44
  return x
45
 
46
  model = CustomModel(input_shape=(3,128,128), num_classes=2)
47
- model.load_state_dict(torch.load('model.pth'))
 
48
 
49
  def greet(image):
50
  return "Hello " + "name" + "!!"
 
44
  return x
45
 
46
  model = CustomModel(input_shape=(3,128,128), num_classes=2)
47
+ model.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
48
+
49
 
50
  def greet(image):
51
  return "Hello " + "name" + "!!"