Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,9 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from transformers import AutoProcessor, AutoModel
|
4 |
import scipy.io.wavfile as wavfile
|
5 |
-
import spaces
|
6 |
|
7 |
-
#
|
8 |
def load_model():
|
9 |
processor = AutoProcessor.from_pretrained("suno/bark-small")
|
10 |
model = AutoModel.from_pretrained("suno/bark-small")
|
@@ -50,19 +50,18 @@ demo = gr.Interface(
|
|
50 |
fn=text_to_speech,
|
51 |
inputs=[
|
52 |
gr.Textbox(
|
53 |
-
label="Enter text
|
54 |
placeholder="दिल्ली मेट्रो में आपका स्वागत है"
|
55 |
)
|
56 |
],
|
57 |
outputs=gr.Audio(label="Generated Speech"),
|
58 |
title="Bark TTS Test App",
|
59 |
-
description="This app generates speech from text using the Bark TTS model.
|
60 |
examples=[
|
61 |
["दिल्ली मेट्रो में आपका स्वागत है"],
|
62 |
-
["कृपया ध्यान दें"],
|
63 |
["अगला स्टेशन राजीव चौक है"]
|
64 |
],
|
65 |
-
theme="
|
66 |
)
|
67 |
|
68 |
if __name__ == "__main__":
|
|
|
2 |
import torch
|
3 |
from transformers import AutoProcessor, AutoModel
|
4 |
import scipy.io.wavfile as wavfile
|
5 |
+
import spaces
|
6 |
|
7 |
+
# Processor
|
8 |
def load_model():
|
9 |
processor = AutoProcessor.from_pretrained("suno/bark-small")
|
10 |
model = AutoModel.from_pretrained("suno/bark-small")
|
|
|
50 |
fn=text_to_speech,
|
51 |
inputs=[
|
52 |
gr.Textbox(
|
53 |
+
label="Enter text",
|
54 |
placeholder="दिल्ली मेट्रो में आपका स्वागत है"
|
55 |
)
|
56 |
],
|
57 |
outputs=gr.Audio(label="Generated Speech"),
|
58 |
title="Bark TTS Test App",
|
59 |
+
description="This app generates speech from text using the Bark TTS model.",
|
60 |
examples=[
|
61 |
["दिल्ली मेट्रो में आपका स्वागत है"],
|
|
|
62 |
["अगला स्टेशन राजीव चौक है"]
|
63 |
],
|
64 |
+
theme="default
|
65 |
)
|
66 |
|
67 |
if __name__ == "__main__":
|