Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,6 +44,7 @@ def postSummaryWithBart(blog_link):
|
|
44 |
# importing libraries
|
45 |
from bs4 import BeautifulSoup
|
46 |
import requests
|
|
|
47 |
|
48 |
# getting our blog post
|
49 |
URL = blog_link
|
@@ -57,7 +58,7 @@ def postSummaryWithBart(blog_link):
|
|
57 |
ARTICLE = ARTICLE.replace('.', '.')
|
58 |
ARTICLE = ARTICLE.replace('?', '?')
|
59 |
ARTICLE = ARTICLE.replace('!', '!')
|
60 |
-
sentences =
|
61 |
|
62 |
# chunking text
|
63 |
max_chunk = 500
|
|
|
44 |
# importing libraries
|
45 |
from bs4 import BeautifulSoup
|
46 |
import requests
|
47 |
+
import re
|
48 |
|
49 |
# getting our blog post
|
50 |
URL = blog_link
|
|
|
58 |
ARTICLE = ARTICLE.replace('.', '.')
|
59 |
ARTICLE = ARTICLE.replace('?', '?')
|
60 |
ARTICLE = ARTICLE.replace('!', '!')
|
61 |
+
sentences = re.split('[.?!]', ARTICLE)
|
62 |
|
63 |
# chunking text
|
64 |
max_chunk = 500
|