Tomás F commited on
Commit
2bd1ee1
1 Parent(s): 6bc492b

Fix sorting

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