Kartikeyssj2 commited on
Commit
584b121
·
verified ·
1 Parent(s): be76330

Update fast_api.py

Browse files
Files changed (1) hide show
  1. 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