Spaces:
Runtime error
Runtime error
Update src/models/whisper_specrnet.py
Browse files
src/models/whisper_specrnet.py
CHANGED
|
@@ -12,7 +12,7 @@ class WhisperSpecRNet(SpecRNet):
|
|
| 12 |
super().__init__(input_channels=input_channels, **kwargs)
|
| 13 |
|
| 14 |
self.device = kwargs["device"]
|
| 15 |
-
checkpoint = torch.load(WHISPER_MODEL_WEIGHTS_PATH)
|
| 16 |
dims = ModelDimensions(**checkpoint["dims"].__dict__)
|
| 17 |
model = Whisper(dims)
|
| 18 |
model = model.to(self.device)
|
|
|
|
| 12 |
super().__init__(input_channels=input_channels, **kwargs)
|
| 13 |
|
| 14 |
self.device = kwargs["device"]
|
| 15 |
+
checkpoint = torch.load(WHISPER_MODEL_WEIGHTS_PATH, map_location=torch.device('cpu'))
|
| 16 |
dims = ModelDimensions(**checkpoint["dims"].__dict__)
|
| 17 |
model = Whisper(dims)
|
| 18 |
model = model.to(self.device)
|