Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from models.tacotron2 import Tacotron2Wave
|
3 |
model = Tacotron2Wave('pretrained/tacotron2_ar_adv.pth')
|
4 |
model = model.cuda()
|
@@ -10,6 +11,7 @@ def clean_text(text):
|
|
10 |
cleaned_text = re.sub(r"[0-9a-zA-Z\.]", " ", text)
|
11 |
|
12 |
return cleaned_text
|
|
|
13 |
def greet2(text):
|
14 |
|
15 |
text=clean_text(text).strip()
|
@@ -21,7 +23,7 @@ def greet2(text):
|
|
21 |
|
22 |
yield 22025,wave.view(-1).cpu().numpy()
|
23 |
except :pass
|
24 |
-
|
25 |
def greet(text):
|
26 |
|
27 |
t=clean_text(text).strip()
|
|
|
1 |
import gradio as gr
|
2 |
+
import spaces
|
3 |
from models.tacotron2 import Tacotron2Wave
|
4 |
model = Tacotron2Wave('pretrained/tacotron2_ar_adv.pth')
|
5 |
model = model.cuda()
|
|
|
11 |
cleaned_text = re.sub(r"[0-9a-zA-Z\.]", " ", text)
|
12 |
|
13 |
return cleaned_text
|
14 |
+
|
15 |
def greet2(text):
|
16 |
|
17 |
text=clean_text(text).strip()
|
|
|
23 |
|
24 |
yield 22025,wave.view(-1).cpu().numpy()
|
25 |
except :pass
|
26 |
+
@spaces.GPU
|
27 |
def greet(text):
|
28 |
|
29 |
t=clean_text(text).strip()
|