varl42 commited on
Commit
ecca0d6
·
1 Parent(s): 139900a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -28,6 +28,8 @@ def summarize_text(text):
28
  end = start + 6
29
  break
30
  abstract = ". ".join(sentences[start:end+1])
 
 
31
 
32
  # Load BART model & tokenizer
33
  tokenizer = AutoTokenizer.from_pretrained("pszemraj/led-base-book-summary")
 
28
  end = start + 6
29
  break
30
  abstract = ". ".join(sentences[start:end+1])
31
+ else:
32
+ return("Abstract section not found")
33
 
34
  # Load BART model & tokenizer
35
  tokenizer = AutoTokenizer.from_pretrained("pszemraj/led-base-book-summary")