Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import soundfile as sf
|
|
3 |
import tempfile
|
4 |
import gradio as gr
|
5 |
import torch
|
|
|
6 |
|
7 |
|
8 |
tts_model = VitsModel.from_pretrained("facebook/mms-tts-pol")
|
@@ -14,6 +15,7 @@ tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-pol")
|
|
14 |
title = "Polish Text-To-Speech model based on facebook/mms-tts-pol"
|
15 |
|
16 |
def tts(text: str, language: str):
|
|
|
17 |
inputs = tokenizer(text, return_tensors="pt")
|
18 |
with torch.no_grad():
|
19 |
output = tts_model(**inputs).waveform.squeeze().numpy()
|
|
|
3 |
import tempfile
|
4 |
import gradio as gr
|
5 |
import torch
|
6 |
+
from datetime import datetime
|
7 |
|
8 |
|
9 |
tts_model = VitsModel.from_pretrained("facebook/mms-tts-pol")
|
|
|
15 |
title = "Polish Text-To-Speech model based on facebook/mms-tts-pol"
|
16 |
|
17 |
def tts(text: str, language: str):
|
18 |
+
print(f"When: {datetime.today().strftime('%Y-%m-%d %H:%M:%S')} :", text)
|
19 |
inputs = tokenizer(text, return_tensors="pt")
|
20 |
with torch.no_grad():
|
21 |
output = tts_model(**inputs).waveform.squeeze().numpy()
|