Spaces:
Running
on
Zero
Running
on
Zero
Add Zero GPU support
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import os
|
|
2 |
import torchaudio
|
3 |
import torch
|
4 |
import gradio as gr
|
|
|
5 |
|
6 |
|
7 |
from pflow.models.pflow_tts import pflowTTS
|
@@ -66,7 +67,7 @@ _ = model.eval()
|
|
66 |
vocos_44100 = Vocos.from_pretrained(VOCODER44_MODEL_PATH).to(device)
|
67 |
vocos_22050 = Vocos.from_pretrained(VOCODER22_MODEL_PATH).to(device)
|
68 |
|
69 |
-
|
70 |
@torch.inference_mode()
|
71 |
def synthesise(text, ipa, prompt_selection, audio_prompt, temperature, speed):
|
72 |
print(text, prompt_selection, temperature, speed)
|
|
|
2 |
import torchaudio
|
3 |
import torch
|
4 |
import gradio as gr
|
5 |
+
import spaces
|
6 |
|
7 |
|
8 |
from pflow.models.pflow_tts import pflowTTS
|
|
|
67 |
vocos_44100 = Vocos.from_pretrained(VOCODER44_MODEL_PATH).to(device)
|
68 |
vocos_22050 = Vocos.from_pretrained(VOCODER22_MODEL_PATH).to(device)
|
69 |
|
70 |
+
@spaces.GPU
|
71 |
@torch.inference_mode()
|
72 |
def synthesise(text, ipa, prompt_selection, audio_prompt, temperature, speed):
|
73 |
print(text, prompt_selection, temperature, speed)
|