youngshen commited on
Commit
68c97ea
·
verified ·
1 Parent(s): 82ab075

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -14,13 +14,11 @@ vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan")
14
  speaker_embeddings = {
15
  "BDL": "spkemb/cmu_us_bdl_arctic-wav-arctic_a0009.npy",
16
  "CLB": "spkemb/cmu_us_clb_arctic-wav-arctic_a0144.npy",
17
- "KSP": "spkemb/cmu_us_ksp_arctic-wav-arctic_b0087.npy",
18
- "RMS": "spkemb/cmu_us_rms_arctic-wav-arctic_b0353.npy",
19
  "SLT": "spkemb/cmu_us_slt_arctic-wav-arctic_a0508.npy",
20
  }
21
 
22
  def getNews(search_key):
23
- return requests.get ("https://newsapi.org/v2/everything?q=" +search_key+ "&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8")
24
  # return requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8" )
25
 
26
  def getHeadlines():
@@ -89,8 +87,6 @@ examples = [
89
  ["It is not in the stars to hold our destiny but in ourselves.", "BDL (male)"],
90
  ["The octopus and Oliver went to the opera in October.", "CLB (female)"],
91
  ["She sells seashells by the seashore. I saw a kitten eating chicken in the kitchen.", "RMS (male)"],
92
- ["Brisk brave brigadiers brandished broad bright blades, blunderbusses, and bludgeons—balancing them badly.", "SLT (female)"],
93
- ["A synonym for cinnamon is a cinnamon synonym.", "BDL (male)"],
94
  ["How much wood would a woodchuck chuck if a woodchuck could chuck wood? He would chuck, he would, as much as he could, and chuck as much wood as a woodchuck would if a woodchuck could chuck wood.", "CLB (female)"],
95
  ]
96
 
@@ -101,8 +97,6 @@ gr.Interface(
101
  gr.Radio(label="Speaker", choices=[
102
  "BDL (male)",
103
  "CLB (female)",
104
- "KSP (male)",
105
- "RMS (male)",
106
  "SLT (female)",
107
  "Surprise Me!"
108
  ],
 
14
  speaker_embeddings = {
15
  "BDL": "spkemb/cmu_us_bdl_arctic-wav-arctic_a0009.npy",
16
  "CLB": "spkemb/cmu_us_clb_arctic-wav-arctic_a0144.npy",
 
 
17
  "SLT": "spkemb/cmu_us_slt_arctic-wav-arctic_a0508.npy",
18
  }
19
 
20
  def getNews(search_key):
21
+ return requests.get ("https://newsapi.org/v2/everything?q=" +search_key+ "&pageSize=3&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8")
22
  # return requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8" )
23
 
24
  def getHeadlines():
 
87
  ["It is not in the stars to hold our destiny but in ourselves.", "BDL (male)"],
88
  ["The octopus and Oliver went to the opera in October.", "CLB (female)"],
89
  ["She sells seashells by the seashore. I saw a kitten eating chicken in the kitchen.", "RMS (male)"],
 
 
90
  ["How much wood would a woodchuck chuck if a woodchuck could chuck wood? He would chuck, he would, as much as he could, and chuck as much wood as a woodchuck would if a woodchuck could chuck wood.", "CLB (female)"],
91
  ]
92
 
 
97
  gr.Radio(label="Speaker", choices=[
98
  "BDL (male)",
99
  "CLB (female)",
 
 
100
  "SLT (female)",
101
  "Surprise Me!"
102
  ],