Tomás F commited on
Commit
74de87c
1 Parent(s): 3e0d335

Sort articles and display publishing date

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -56,7 +56,9 @@ target_sentiments = st.sidebar.multiselect(
56
  default=sentiment_distribution.keys())
57
 
58
  with st.spinner('📰 Loading articles...'):
59
- target_articles = load_news(rss_feeds.get(target_source))
 
 
60
 
61
  with st.spinner('⚙️ Analysing articles...'):
62
  classified_articles = classify_articles(target_articles, pipe)
 
56
  default=sentiment_distribution.keys())
57
 
58
  with st.spinner('📰 Loading articles...'):
59
+ target_articles = load_news(
60
+ rss_feeds.get(target_source)
61
+ ).sort(key=lambda a: a.pubDate)
62
 
63
  with st.spinner('⚙️ Analysing articles...'):
64
  classified_articles = classify_articles(target_articles, pipe)