Spaces:
Runtime error
Runtime error
Commit ·
a90e403
1
Parent(s): 7236efe
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,14 @@ model = BartForConditionalGeneration.from_pretrained("facebook/bart-large-cnn")
|
|
| 18 |
tokenizer = BartTokenizer.from_pretrained("facebook/bart-large-cnn")
|
| 19 |
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
#Defining a function to get the summary of the article
|
| 22 |
def final_summary(file):
|
| 23 |
|
|
|
|
| 18 |
tokenizer = BartTokenizer.from_pretrained("facebook/bart-large-cnn")
|
| 19 |
|
| 20 |
|
| 21 |
+
# Defining a function to read in the text file
|
| 22 |
+
def read_in_text(url):
|
| 23 |
+
with open(URL, "r") as file:
|
| 24 |
+
article = file.read()
|
| 25 |
+
|
| 26 |
+
return article
|
| 27 |
+
|
| 28 |
+
|
| 29 |
#Defining a function to get the summary of the article
|
| 30 |
def final_summary(file):
|
| 31 |
|