MadhavManoj commited on
Commit
3916e4c
·
verified ·
1 Parent(s): 93dd294

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from transformers import pipeline
3
 
4
  # Load the text-to-audio model
5
- tts = pipeline("text-to-audio", model="facebook/musicgen-small")
6
 
7
  def text_to_audio(text):
8
  output = tts(text)
@@ -10,9 +10,9 @@ def text_to_audio(text):
10
 
11
  # Create Gradio interface
12
  iface = gr.Interface(
13
- fn=text_to_audio,
14
  inputs=gr.Textbox(label="Enter Text"),
15
- outputs=gr.Audio(label="Generated Audio"),
16
  title="Text-to-Audio Chatbot",
17
  description="Enter text, and get an AI-generated audio response."
18
  )
 
2
  from transformers import pipeline
3
 
4
  # Load the text-to-audio model
5
+ tts = pipeline("create_music", model="facebook/musicgen-small")
6
 
7
  def text_to_audio(text):
8
  output = tts(text)
 
10
 
11
  # Create Gradio interface
12
  iface = gr.Interface(
13
+ fn=create_music,
14
  inputs=gr.Textbox(label="Enter Text"),
15
+ outputs="audio"
16
  title="Text-to-Audio Chatbot",
17
  description="Enter text, and get an AI-generated audio response."
18
  )