Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def predict_gradio(img):
|
|
33 |
#Load model
|
34 |
model_path = 'model_2.pth'
|
35 |
loaded_model_2 = custom_model(input_param=3, output_param=10)
|
36 |
-
loaded_model_2.load_state_dict(torch.load(f=model_path
|
37 |
loaded_model_2.eval()
|
38 |
|
39 |
with torch.inference_mode():
|
|
|
33 |
#Load model
|
34 |
model_path = 'model_2.pth'
|
35 |
loaded_model_2 = custom_model(input_param=3, output_param=10)
|
36 |
+
loaded_model_2.load_state_dict(torch.load(f=model_path, map_location=torch.device("cpu")))
|
37 |
loaded_model_2.eval()
|
38 |
|
39 |
with torch.inference_mode():
|