Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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 |
|