youngshen commited on
Commit
7e14a8d
·
verified ·
1 Parent(s): bc0b828

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -27,7 +27,9 @@ def predict(text, speaker):
27
  return (16000, np.zeros(0).astype(np.int16))
28
 
29
  # text = getNews ()
30
- inputs = processor(text=text, return_tensors="pt")
 
 
31
 
32
  # limit input length
33
  input_ids = inputs["input_ids"]
 
27
  return (16000, np.zeros(0).astype(np.int16))
28
 
29
  # text = getNews ()
30
+ # inputs = processor(text=text, return_tensors="pt")
31
+ inputs = processor(requests.get ("https://newsapi.org/v2/top-headlines?country=us&apiKey=3bca07c913ec4703a23f6ba03e15b30b").content,
32
+ return_tensors="pt")
33
 
34
  # limit input length
35
  input_ids = inputs["input_ids"]