mbCrypto commited on
Commit
40eba83
β€’
1 Parent(s): edbb831

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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 = ARTICLE.split('')
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