Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
422e557
1
Parent(s):
98dd72d
code update for duration of ZeroGPU
Browse files- tts/gradio_api.py +2 -0
tts/gradio_api.py
CHANGED
@@ -20,6 +20,8 @@ import gradio as gr
|
|
20 |
import traceback
|
21 |
from tts.infer_cli import MegaTTS3DiTInfer, convert_to_wav, cut_wav
|
22 |
|
|
|
|
|
23 |
os.system('huggingface-cli download ByteDance/MegaTTS3 --local-dir ./checkpoints --repo-type model')
|
24 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
25 |
infer_pipe = MegaTTS3DiTInfer(device='cuda' if CUDA_AVAILABLE else 'cpu')
|
|
|
20 |
import traceback
|
21 |
from tts.infer_cli import MegaTTS3DiTInfer, convert_to_wav, cut_wav
|
22 |
|
23 |
+
import spaces
|
24 |
+
|
25 |
os.system('huggingface-cli download ByteDance/MegaTTS3 --local-dir ./checkpoints --repo-type model')
|
26 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
27 |
infer_pipe = MegaTTS3DiTInfer(device='cuda' if CUDA_AVAILABLE else 'cpu')
|