Spaces:
Running
Running
comment on the "Abstract section not found" if else statement
Browse filesif start is not None and end is not None:
abstract = ". ".join(sentences[start:end+1])
#print(abstract)
else: #if the Abstract is not found
return("Abstract section not found")
app.py
CHANGED
@@ -31,7 +31,7 @@ def summarize_text(text):
|
|
31 |
if start is not None and end is not None:
|
32 |
abstract = ". ".join(sentences[start:end+1])
|
33 |
#print(abstract)
|
34 |
-
else:
|
35 |
return("Abstract section not found")
|
36 |
|
37 |
# Load BART model & tokenizer
|
|
|
31 |
if start is not None and end is not None:
|
32 |
abstract = ". ".join(sentences[start:end+1])
|
33 |
#print(abstract)
|
34 |
+
else: #if the Abstract is not found
|
35 |
return("Abstract section not found")
|
36 |
|
37 |
# Load BART model & tokenizer
|