Kartikeyssj2 commited on
Commit
3a14d6f
·
verified ·
1 Parent(s): 78ab44f

Update fast_api.py

Browse files
Files changed (1) hide show
  1. fast_api.py +1 -1
fast_api.py CHANGED
@@ -26,7 +26,7 @@ def load_whisper_model(model_path, device='cpu'):
26
  )
27
 
28
  # Load state dict
29
- state_dict = torch.load(model_path, map_location=device)
30
  model.load_state_dict(state_dict)
31
  model.eval()
32
  return model
 
26
  )
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