Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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()
|