Spaces:
Sleeping
Sleeping
asdasd
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import torch
|
|
6 |
model = VitsModel.from_pretrained("facebook/mms-tts-crh")
|
7 |
tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-crh")
|
8 |
|
|
|
9 |
def predict(image):
|
10 |
global model, tokenizer
|
11 |
text = name
|
@@ -15,11 +16,11 @@ def predict(image):
|
|
15 |
with torch.no_grad():
|
16 |
output = model(**inputs).waveform
|
17 |
|
18 |
-
return output
|
19 |
|
20 |
gr.Interface(
|
21 |
predict,
|
22 |
-
inputs= gr.Textbox(value="", label="Duration in seconds")
|
23 |
outputs="audio",
|
24 |
title="Hot Dog? Or Not?",
|
25 |
).launch()
|
|
|
6 |
model = VitsModel.from_pretrained("facebook/mms-tts-crh")
|
7 |
tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-crh")
|
8 |
|
9 |
+
|
10 |
def predict(image):
|
11 |
global model, tokenizer
|
12 |
text = name
|
|
|
16 |
with torch.no_grad():
|
17 |
output = model(**inputs).waveform
|
18 |
|
19 |
+
return gr.Audio(output)
|
20 |
|
21 |
gr.Interface(
|
22 |
predict,
|
23 |
+
inputs= gr.Textbox(value="", label="Duration in seconds"),,
|
24 |
outputs="audio",
|
25 |
title="Hot Dog? Or Not?",
|
26 |
).launch()
|