Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
78f4d94
1
Parent(s):
7e200c7
add huggingface gpu
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import soundfile as sf
|
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
import traceback
|
|
|
9 |
|
10 |
repo_url = "https://huggingface.co/dangtr0408/StyleTTS2-lite-vi"
|
11 |
repo_dir = "StyleTTS2-lite-vi"
|
@@ -27,6 +28,7 @@ eg_texts = [
|
|
27 |
|
28 |
|
29 |
# Core inference function
|
|
|
30 |
def main(reference_paths, text_prompt, denoise, avg_style, stabilize):
|
31 |
try:
|
32 |
speakers = {}
|
|
|
6 |
import numpy as np
|
7 |
import torch
|
8 |
import traceback
|
9 |
+
import spaces
|
10 |
|
11 |
repo_url = "https://huggingface.co/dangtr0408/StyleTTS2-lite-vi"
|
12 |
repo_dir = "StyleTTS2-lite-vi"
|
|
|
28 |
|
29 |
|
30 |
# Core inference function
|
31 |
+
@spaces.GPU
|
32 |
def main(reference_paths, text_prompt, denoise, avg_style, stabilize):
|
33 |
try:
|
34 |
speakers = {}
|