Spaces:
Sleeping
Sleeping
cpu error
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ label_encoder_type = joblib.load(LABEL_ENCODER_TYPE_PATH)
|
|
16 |
|
17 |
# Load the model
|
18 |
model = MultiOutputModel(num_classes_type=len(label_encoder_type.classes_))
|
19 |
-
model.load_state_dict(torch.load(MODEL_PATH))
|
20 |
model.eval() # Set the model to evaluation mode
|
21 |
|
22 |
# Define the image transformations
|
|
|
16 |
|
17 |
# Load the model
|
18 |
model = MultiOutputModel(num_classes_type=len(label_encoder_type.classes_))
|
19 |
+
model.load_state_dict(torch.load(MODEL_PATH,map_location=torch.device('cpu')))
|
20 |
model.eval() # Set the model to evaluation mode
|
21 |
|
22 |
# Define the image transformations
|