Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,12 +22,7 @@ def fetch_news(topic):
|
|
| 22 |
return articles
|
| 23 |
|
| 24 |
|
| 25 |
-
|
| 26 |
-
"""Fetches the full text of an article given its URL."""
|
| 27 |
-
article = Article(url)
|
| 28 |
-
article.download()
|
| 29 |
-
article.parse()
|
| 30 |
-
return article.text
|
| 31 |
|
| 32 |
|
| 33 |
|
|
@@ -53,7 +48,13 @@ def page_trending_niche():
|
|
| 53 |
st.write("---")
|
| 54 |
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
# Initialize the summarization pipeline with BART
|
|
|
|
| 22 |
return articles
|
| 23 |
|
| 24 |
|
| 25 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
|
|
|
|
| 48 |
st.write("---")
|
| 49 |
|
| 50 |
|
| 51 |
+
def fetch_full_article(url):
|
| 52 |
+
"""Fetches the full text of an article given its URL."""
|
| 53 |
+
article = Article(url)
|
| 54 |
+
article.download()
|
| 55 |
+
article.parse()
|
| 56 |
+
return article.text
|
| 57 |
+
|
| 58 |
|
| 59 |
|
| 60 |
# Initialize the summarization pipeline with BART
|