lhzstar commited on
Commit
d161621
·
1 Parent(s): 2e013d2

new commits

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. run_tts.py +1 -1
  3. utils.py +1 -2
app.py CHANGED
@@ -8,7 +8,7 @@ from utils import *
8
  def main():
9
 
10
  hide_footer()
11
- model_list = ["flan-t5-xl"]
12
  celeb_data = get_celeb_data(f'data.json')
13
 
14
  st.sidebar.header("CelebChat")
 
8
  def main():
9
 
10
  hide_footer()
11
+ model_list = ["flan-t5-large"]
12
  celeb_data = get_celeb_data(f'data.json')
13
 
14
  st.sidebar.header("CelebChat")
run_tts.py CHANGED
@@ -82,7 +82,7 @@ def tts(text, embed_name, nlp, autoplay=True):
82
 
83
  # Synthesizing the waveform is fairly straightforward. Remember that the longer the
84
  # spectrogram, the more time-efficient the vocoder.
85
- wav = vocoder.infer_waveform(spec, target=4000, overlap=400)
86
  # wav = synthesizer.griffin_lim(spec)
87
  wav = vocoder.waveform_denoising(wav)
88
 
 
82
 
83
  # Synthesizing the waveform is fairly straightforward. Remember that the longer the
84
  # spectrogram, the more time-efficient the vocoder.
85
+ wav = vocoder.infer_waveform(spec)
86
  # wav = synthesizer.griffin_lim(spec)
87
  wav = vocoder.waveform_denoising(wav)
88
 
utils.py CHANGED
@@ -41,7 +41,7 @@ def get_celeb_data(fpath):
41
  with open(fpath, encoding='UTF-8') as json_file:
42
  return json.load(json_file)
43
 
44
- @st.cache_data
45
  def get_article(url):
46
  req = Request(
47
  url=url,
@@ -67,7 +67,6 @@ def get_article(url):
67
  return text
68
 
69
 
70
- @st.cache_resource
71
  def preprocess_text(name, gender, text, model_id):
72
  lname = name.split(" ")[-1]
73
  lnames = lname+"’s"
 
41
  with open(fpath, encoding='UTF-8') as json_file:
42
  return json.load(json_file)
43
 
44
+
45
  def get_article(url):
46
  req = Request(
47
  url=url,
 
67
  return text
68
 
69
 
 
70
  def preprocess_text(name, gender, text, model_id):
71
  lname = name.split(" ")[-1]
72
  lnames = lname+"’s"