bauerem commited on
Commit
70f8354
1 Parent(s): f91afe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -7,10 +7,7 @@ summarizer = MemSum(model_path, "model/glove/vocabulary_200dim.pkl")
7
 
8
  sent_tokenize = lambda txt: re.split(r'(?<=[.!?])\s(?=[A-Z])', txt)
9
 
10
- def preprocess(text):
11
- text = text.replace("\n", " ")
12
- text = re.sub(r'\s+', ' ', text)
13
- return text
14
 
15
  def summarize(text):
16
 
 
7
 
8
  sent_tokenize = lambda txt: re.split(r'(?<=[.!?])\s(?=[A-Z])', txt)
9
 
10
+ preprocess = lambda text: re.sub(r'[\n\s]+', ' ', text)
 
 
 
11
 
12
  def summarize(text):
13