kevinwang676 commited on
Commit
257610a
·
verified ·
1 Parent(s): cd85491

Update inference/svs/gradio/infer.py

Browse files
Files changed (1) hide show
  1. inference/svs/gradio/infer.py +2 -0
inference/svs/gradio/infer.py CHANGED
@@ -10,6 +10,7 @@ from utils.hparams import set_hparams
10
  from utils.hparams import hparams as hp
11
  import numpy as np
12
 
 
13
 
14
  class GradioInfer:
15
  def __init__(self, exp_name, inference_cls, title, description, article, example_inputs):
@@ -22,6 +23,7 @@ class GradioInfer:
22
  cls_name = inference_cls.split(".")[-1]
23
  self.inference_cls = getattr(importlib.import_module(pkg), cls_name)
24
 
 
25
  def greet(self, text, notes, notes_duration):
26
  PUNCS = '。?;:'
27
  sents = re.split(rf'([{PUNCS}])', text.replace('\n', ','))
 
10
  from utils.hparams import hparams as hp
11
  import numpy as np
12
 
13
+ import spaces
14
 
15
  class GradioInfer:
16
  def __init__(self, exp_name, inference_cls, title, description, article, example_inputs):
 
23
  cls_name = inference_cls.split(".")[-1]
24
  self.inference_cls = getattr(importlib.import_module(pkg), cls_name)
25
 
26
+ @spaces.GPU(duration=180)
27
  def greet(self, text, notes, notes_duration):
28
  PUNCS = '。?;:'
29
  sents = re.split(rf'([{PUNCS}])', text.replace('\n', ','))