Spaces:
Runtime error
Runtime error
Kartikeyssj2
commited on
Update fast_api.py
Browse files- fast_api.py +2 -1
fast_api.py
CHANGED
@@ -27,7 +27,8 @@ def load_whisper_model(model_path, device='cpu'):
|
|
27 |
|
28 |
# Load state dict
|
29 |
state_dict = torch.load(model_path, map_location=device, weights_only=True)
|
30 |
-
model.load_state_dict(state_dict)
|
|
|
31 |
model.eval()
|
32 |
return model
|
33 |
|
|
|
27 |
|
28 |
# Load state dict
|
29 |
state_dict = torch.load(model_path, map_location=device, weights_only=True)
|
30 |
+
model.load_state_dict(state_dict, strict=False)
|
31 |
+
|
32 |
model.eval()
|
33 |
return model
|
34 |
|