victor HF staff commited on
Commit
e8c7350
·
verified ·
1 Parent(s): a9d18bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -11,6 +11,7 @@ class WikipediaBot:
11
  def __init__(self):
12
  self.summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
13
 
 
14
  def search_wikipedia(self, query):
15
  query = urllib.parse.quote_plus(query)
16
  data = requests.get(self.SEARCH_TEMPLATE % query).json()
 
11
  def __init__(self):
12
  self.summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
13
 
14
+ @spaces.GPU
15
  def search_wikipedia(self, query):
16
  query = urllib.parse.quote_plus(query)
17
  data = requests.get(self.SEARCH_TEMPLATE % query).json()