Spaces:
Runtime error
Runtime error
Update inference/svs/base_svs_infer.py
Browse files
inference/svs/base_svs_infer.py
CHANGED
@@ -14,6 +14,7 @@ import librosa
|
|
14 |
import glob
|
15 |
import re
|
16 |
|
|
|
17 |
|
18 |
class BaseSVSInfer:
|
19 |
def __init__(self, hparams, device=None):
|
@@ -225,6 +226,7 @@ class BaseSVSInfer:
|
|
225 |
def postprocess_output(self, output):
|
226 |
return output
|
227 |
|
|
|
228 |
def infer_once(self, inp):
|
229 |
inp = self.preprocess_input(inp, input_type=inp['input_type'] if inp.get('input_type') else 'word')
|
230 |
output = self.forward_model(inp)
|
|
|
14 |
import glob
|
15 |
import re
|
16 |
|
17 |
+
import spaces
|
18 |
|
19 |
class BaseSVSInfer:
|
20 |
def __init__(self, hparams, device=None):
|
|
|
226 |
def postprocess_output(self, output):
|
227 |
return output
|
228 |
|
229 |
+
@spaces.GPU(duration=180)
|
230 |
def infer_once(self, inp):
|
231 |
inp = self.preprocess_input(inp, input_type=inp['input_type'] if inp.get('input_type') else 'word')
|
232 |
output = self.forward_model(inp)
|