Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,9 +16,9 @@ import torch
|
|
16 |
def modelspeech(text):
|
17 |
|
18 |
|
19 |
-
inputs = tokenizer(text, return_tensors="pt")
|
20 |
with torch.no_grad():
|
21 |
-
wav = model(input_ids=inputs["input_ids"]).waveform.cpu().numpy().reshape(-1)#.detach()
|
22 |
|
23 |
return model.config.sampling_rate,wav#remove_noise_nr(wav)
|
24 |
|
|
|
16 |
def modelspeech(text):
|
17 |
|
18 |
|
19 |
+
inputs = tokenizer(text, return_tensors="pt")
|
20 |
with torch.no_grad():
|
21 |
+
wav = model(input_ids=inputs["input_ids"].cuda()).waveform.cpu().numpy().reshape(-1)#.detach()
|
22 |
|
23 |
return model.config.sampling_rate,wav#remove_noise_nr(wav)
|
24 |
|