youngshen commited on
Commit
9148da7
·
verified ·
1 Parent(s): 339a99b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,7 +19,7 @@ speaker_embeddings = {
19
  "SLT": "spkemb/cmu_us_slt_arctic-wav-arctic_a0508.npy",
20
  }
21
 
22
- def getNews ():
23
  return requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8")
24
 
25
  def predict(text, speaker):
@@ -28,7 +28,7 @@ def predict(text, speaker):
28
 
29
  # text = getNews ()
30
  # inputs = processor(text=text, return_tensors="pt")
31
- inputs = processor(text=requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8"),
32
  return_tensors="pt")
33
 
34
  # limit input length
 
19
  "SLT": "spkemb/cmu_us_slt_arctic-wav-arctic_a0508.npy",
20
  }
21
 
22
+ def getNews():
23
  return requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content.decode("utf-8")
24
 
25
  def predict(text, speaker):
 
28
 
29
  # text = getNews ()
30
  # inputs = processor(text=text, return_tensors="pt")
31
+ inputs = processor(text=getNews(),
32
  return_tensors="pt")
33
 
34
  # limit input length