gauri-sharan commited on
Commit
1ffe71f
·
verified ·
1 Parent(s): 1a52f9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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 # Import the spaces module
6
 
7
- # Load the model and processor
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 (Hindi supported)",
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. Supports Hindi.",
60
  examples=[
61
  ["दिल्ली मेट्रो में आपका स्वागत है"],
62
- ["कृपया ध्यान दें"],
63
  ["अगला स्टेशन राजीव चौक है"]
64
  ],
65
- theme="compact" # You can customize the 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__":