MostafaAhmed98
commited on
Commit
•
e879ffa
1
Parent(s):
1f6acc0
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def load_the_model():
|
|
35 |
return x
|
36 |
|
37 |
loaded_model = Net()#.to(device)
|
38 |
-
loaded_model.load_state_dict(torch.load(path_of_model
|
39 |
loaded_model.eval()
|
40 |
return loaded_model
|
41 |
|
|
|
35 |
return x
|
36 |
|
37 |
loaded_model = Net()#.to(device)
|
38 |
+
loaded_model.load_state_dict(torch.load(path_of_model, map_location=torch.device('cpu')))
|
39 |
loaded_model.eval()
|
40 |
return loaded_model
|
41 |
|