Nag189 commited on
Commit
1e2ec28
1 Parent(s): 096b21e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ st.title("Text-to-Voice Conversion")
19
  st.markdown("Convert your text to speech using advanced AI models.")
20
 
21
  # Load models outside of function calls for efficiency
22
- @st.cache_data.(allow_output_mutation=True)
23
  def load_models():
24
  model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
25
  processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
@@ -29,7 +29,7 @@ def load_models():
29
  model, processor, vocoder = load_models()
30
 
31
  # Load speaker embeddings
32
- @st.cache_data.(allow_output_mutation=True)
33
  def get_speaker_embeddings():
34
  speaker_embeddings = np.load("cmu_us_slt_arctic-wav-arctic_a0508.npy")
35
  return torch.tensor(speaker_embeddings).unsqueeze(0)
 
19
  st.markdown("Convert your text to speech using advanced AI models.")
20
 
21
  # Load models outside of function calls for efficiency
22
+ @st.cache_data(allow_output_mutation=True)
23
  def load_models():
24
  model = SpeechT5ForTextToSpeech.from_pretrained("microsoft/speecht5_tts")
25
  processor = SpeechT5Processor.from_pretrained("microsoft/speecht5_tts")
 
29
  model, processor, vocoder = load_models()
30
 
31
  # Load speaker embeddings
32
+ @st.cache_data(allow_output_mutation=True)
33
  def get_speaker_embeddings():
34
  speaker_embeddings = np.load("cmu_us_slt_arctic-wav-arctic_a0508.npy")
35
  return torch.tensor(speaker_embeddings).unsqueeze(0)