Spaces:
Running
on
Zero
Running
on
Zero
Update infer.py
Browse files
infer.py
CHANGED
@@ -150,7 +150,7 @@ class DMOInference:
|
|
150 |
).to(self.device)
|
151 |
|
152 |
self.SLP.eval()
|
153 |
-
self.SLP.load_state_dict(torch.load(checkpoint_path)['model_state_dict'])
|
154 |
|
155 |
def predict_duration(self, pmt_wav_path, tar_text, pmt_text, dp_softmax_range=0.7, temperature=0):
|
156 |
"""
|
|
|
150 |
).to(self.device)
|
151 |
|
152 |
self.SLP.eval()
|
153 |
+
self.SLP.load_state_dict(torch.load(checkpoint_path, map_location='cpu')['model_state_dict'])
|
154 |
|
155 |
def predict_duration(self, pmt_wav_path, tar_text, pmt_text, dp_softmax_range=0.7, temperature=0):
|
156 |
"""
|