oza75 commited on
Commit
8c5eea2
·
verified ·
1 Parent(s): 6fc5349

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -20,7 +20,7 @@ class EndpointHandler:
20
 
21
  # Load model in float32 precision initially
22
  self.model = torch.jit.load(model_file, map_location=self.device)
23
-
24
  # Expected sample rate for the model
25
  self.target_sample_rate = 16000 # ECAPA2 expects 16kHz audio
26
 
 
20
 
21
  # Load model in float32 precision initially
22
  self.model = torch.jit.load(model_file, map_location=self.device)
23
+ self.model.to(torch.float32)
24
  # Expected sample rate for the model
25
  self.target_sample_rate = 16000 # ECAPA2 expects 16kHz audio
26