Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -52,6 +52,11 @@ def summarize_text(text):
|
|
52 |
|
53 |
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
54 |
|
|
|
|
|
|
|
|
|
|
|
55 |
return summary
|
56 |
|
57 |
# Function to convert text to audio
|
|
|
52 |
|
53 |
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
54 |
|
55 |
+
if '.' in summary:
|
56 |
+
index = summary.rindex('.')
|
57 |
+
if index != -1:
|
58 |
+
summary = summary[:index+1]
|
59 |
+
|
60 |
return summary
|
61 |
|
62 |
# Function to convert text to audio
|