Godvshumans commited on
Commit
5c67596
·
verified ·
1 Parent(s): daf469d

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+
4
+ # Load the TTS model
5
+ model = pipeline("text-to-speech", model="galsenai/parler-tts-mini-v1-wolof")
6
+
7
+ def text_to_speech(text):
8
+ audio = model(text)
9
+ return audio
10
+
11
+ # Create the Gradio interface
12
+ interface = gr.Interface(fn=text_to_speech, inputs="text", outputs="audio")
13
+
14
+ interface.launch()