Spaces:
Sleeping
Sleeping
change cut function to stop only at period
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ def search_book_description(title):
|
|
73 |
|
74 |
# function to ensure summaries end with punctuation
|
75 |
def cut(sum):
|
76 |
-
last_punc_idx = max(sum.rfind(
|
77 |
output = sum[: last_punc_idx + 1]
|
78 |
return output
|
79 |
|
|
|
73 |
|
74 |
# function to ensure summaries end with punctuation
|
75 |
def cut(sum):
|
76 |
+
last_punc_idx = max(sum.rfind("."))
|
77 |
output = sum[: last_punc_idx + 1]
|
78 |
return output
|
79 |
|