TLH01 commited on
Commit
2f14f3a
·
verified ·
1 Parent(s): 8327766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
  from PIL import Image
4
- import numpy as np
5
 
6
  # Stage 1: Image to Caption
7
  @st.cache_resource
@@ -27,7 +26,7 @@ def text2story(description):
27
  # Stage 3: Story to Speech
28
  @st.cache_resource
29
  def load_tts():
30
- return pipeline("text-to-speech", model="espnet/kan-bayashi_ljspeech_vits", framework="espnet")
31
 
32
  def story_to_audio(story_text):
33
  tts = load_tts()
 
1
  import streamlit as st
2
  from transformers import pipeline
3
  from PIL import Image
 
4
 
5
  # Stage 1: Image to Caption
6
  @st.cache_resource
 
26
  # Stage 3: Story to Speech
27
  @st.cache_resource
28
  def load_tts():
29
+ return pipeline("text-to-speech", model="facebook/fastspeech2-en-ljspeech")
30
 
31
  def story_to_audio(story_text):
32
  tts = load_tts()