varl42 commited on
Commit
39a42b2
·
1 Parent(s): 5a078c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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