Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- gradio_test.py +1 -1
gradio_test.py
CHANGED
@@ -28,7 +28,7 @@ with open(model_config, 'r') as f:
|
|
28 |
|
29 |
model = get_model_architecture(config_json)
|
30 |
model_path = os.path.join(model_dir, 'model.pth')
|
31 |
-
model.load_state_dict(torch.load(model_path
|
32 |
|
33 |
testing_transform = config_json['TRANSFORMS_TO_APPLY']
|
34 |
testing_transform = [TransformationType[transform] for transform in testing_transform if transform != 'RANDOM_HORIZONTAL_FLIP']
|
|
|
28 |
|
29 |
model = get_model_architecture(config_json)
|
30 |
model_path = os.path.join(model_dir, 'model.pth')
|
31 |
+
model.load_state_dict(torch.load(model_path,map_location=torch.device('cpu')))
|
32 |
|
33 |
testing_transform = config_json['TRANSFORMS_TO_APPLY']
|
34 |
testing_transform = [TransformationType[transform] for transform in testing_transform if transform != 'RANDOM_HORIZONTAL_FLIP']
|