neha-ai-playground commited on
Commit
2c49025
·
1 Parent(s): cf0bbb2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,7 +37,7 @@ def generate_story(scenario):
37
  #textToSpeech
38
 
39
  def text2Speech(story) :
40
- API_URL = "https://api-inference.huggingface.co/models/microsoft/speecht5_tts"
41
  headers = {"Authorization": "Bearer {HF_TOKEN}"}
42
 
43
  def query(payload):
@@ -48,7 +48,7 @@ def text2Speech(story) :
48
  "inputs": story,
49
  })
50
  with open('audio.flac','wb') as file:
51
- file.write(output.content)
52
 
53
  def main() :
54
  st.header("Turn img into Audio Story")
 
37
  #textToSpeech
38
 
39
  def text2Speech(story) :
40
+ API_URL = "https://api-inference.huggingface.co/models/espnet/kan-bayashi_ljspeech_vits"
41
  headers = {"Authorization": "Bearer {HF_TOKEN}"}
42
 
43
  def query(payload):
 
48
  "inputs": story,
49
  })
50
  with open('audio.flac','wb') as file:
51
+ file.write(output)
52
 
53
  def main() :
54
  st.header("Turn img into Audio Story")