lhzstar commited on
Commit
d2b6583
1 Parent(s): 5e66ac4

new commits

Browse files
celebbot.py CHANGED
@@ -29,18 +29,6 @@ class CelebBot():
29
 
30
  self.all_knowledge = knowledge_sents
31
 
32
- @st.cache_resource
33
- def get_seq2seq_model(self, _model_id):
34
- return AutoModelForSeq2SeqLM.from_pretrained(_model_id)
35
-
36
- @st.cache_resource
37
- def get_model(self,_model_id):
38
- return AutoModel.from_pretrained(_model_id)
39
-
40
- @st.cache_resource
41
- def get_tokenizer(self,_model_id):
42
- return AutoTokenizer.from_pretrained(_model_id)
43
-
44
  def speech_to_text(self):
45
  recognizer = sr.Recognizer()
46
  with sr.Microphone() as mic:
 
29
 
30
  self.all_knowledge = knowledge_sents
31
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  def speech_to_text(self):
33
  recognizer = sr.Recognizer()
34
  with sr.Microphone() as mic:
embeds/Cate_Blanchett.npy ADDED
Binary file (1.15 kB). View file
 
embeds/David_Beckham.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Emma_Watson.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Lady_Gaga.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Madonna.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Mark_Zuckerberg.npy ADDED
Binary file (1.15 kB). View file
 
rtvc/utils/default_models.py CHANGED
@@ -7,9 +7,9 @@ from tqdm import tqdm
7
 
8
 
9
  default_models = {
10
- "encoder": ("https://drive.google.com/uc?export=download&id=1q8mEGwCkFy23KZsinbuvdKAQLqNKbYf1", 17090379),
11
- "synthesizer": ("https://drive.google.com/u/0/uc?id=1EqFMIbvxffxtjiVrtykroF6_mUh-5Z3s&export=download&confirm=t", 370554559),
12
- "vocoder": ("https://drive.google.com/uc?export=download&id=1cf2NO6FtI0jDuy8AV3Xgn6leO6dHjIgu", 53845290),
13
  }
14
 
15
 
@@ -51,6 +51,6 @@ def ensure_default_models(run_id: str, models_dir: Path):
51
  for thread, target_path, size in jobs:
52
  thread.join()
53
 
54
- assert target_path.exists() and target_path.stat().st_size == size, \
55
  f"Download for {target_path.name} failed. You may download models manually instead.\n" \
56
- f"https://drive.google.com/drive/folders/1fU6umc5uQAVR2udZdHX-lDgXYzTyqG_j"
 
7
 
8
 
9
  default_models = {
10
+ "encoder": ("https://drive.usercontent.google.com/download?id=1qbQCsSvO_yBWNd-o5oKof2J9M6i-XSdP&export=download&authuser=0&confirm=t&uuid=732920b9-8b71-4148-9a2f-dfbe02832476&at=APZUnTV3XNYoXWUgAYaD51loQmhb:1698458050756", 17090379),
11
+ "synthesizer": ("https://drive.usercontent.google.com/download?id=1gUsGqzXB0z-CUVx7Gbl45ZDdDKVp8KRb&export=download&authuser=0&confirm=t&uuid=dc16fd1e-f57a-4f14-91ae-0a93303dfd81&at=APZUnTVgNtRAPPGDmxeGHceO8sTI:1698458098268", 370554559),
12
+ "vocoder": ("https://drive.usercontent.google.com/download?id=19Hh9JhdqNtVxz2K-9ZTNfE_6Cj6awSUH&export=download&authuser=0&confirm=t&uuid=9f994e59-d3d5-4361-b820-4718965b8f84&at=APZUnTUb8gAxJa55wnmFiaxMOK0C:1698458132086", 53845290),
13
  }
14
 
15
 
 
51
  for thread, target_path, size in jobs:
52
  thread.join()
53
 
54
+ assert target_path.exists(), \
55
  f"Download for {target_path.name} failed. You may download models manually instead.\n" \
56
+ f"https://drive.google.com/drive/folders/11DFU_JBGet_HEwUoPZGDfe-fDZ42eqiG"
run_tts.py CHANGED
@@ -39,6 +39,7 @@ def tts(text, embed_name, nlp, autoplay=True):
39
  device_id = torch.cuda.current_device()
40
  gpu_properties = torch.cuda.get_device_properties(device_id)
41
 
 
42
  synthesizer = Synthesizer_infer(list(models_dir.glob(f"{run_id}/synthesizer.pt"))[0])
43
 
44
  ## Generating the spectrogram
 
39
  device_id = torch.cuda.current_device()
40
  gpu_properties = torch.cuda.get_device_properties(device_id)
41
 
42
+ ensure_default_models(run_id, models_dir)
43
  synthesizer = Synthesizer_infer(list(models_dir.glob(f"{run_id}/synthesizer.pt"))[0])
44
 
45
  ## Generating the spectrogram