Dmitry Beresnev commited on
Commit ·
253cc2c
1
Parent(s): a584bff
fix market intellegence and cache
Browse filesFiles changed (2)
524 unmodified lines525526527528529530531532533534535536537524 unmodified lines# Clear the status message after all sources completestatus_placeholder.success(f"✅ Loaded {len(completed_sources)}/8 sources successfully")# Debug output (remove in production)if st.session_state.get('debug_mode', False):st.write("### Debug: News Fetch Results")st.write(f"- Twitter: {len(twitter_df)} items")st.write(f"- Reddit: {len(reddit_df)} items")st.write(f"- RSS: {len(rss_all_df)} items")st.write(f"- AI/Tech: {len(ai_tech_df)} items")if fetch_errors:st.write(f"- Errors: {len(fetch_errors)}")for err in fetch_errors:524 unmodified lines525526527528529530531532533534535536537538539540541542524 unmodified lines# Clear the status message after all sources completestatus_placeholder.success(f"✅ Loaded {len(completed_sources)}/8 sources successfully")# Debug output - temporarily enabled to diagnose new sourcesif True: # st.session_state.get('debug_mode', False):st.write("### Debug: News Fetch Results")st.write(f"- Twitter: {len(twitter_df)} items")st.write(f"- Reddit: {len(reddit_df)} items")st.write(f"- RSS: {len(rss_all_df)} items")st.write(f"- AI/Tech: {len(ai_tech_df)} items")st.write(f"- Predictions: {len(predictions_df)} items")st.write(f"- Sectoral News: {len(sectoral_news_df)} items")st.write(f"- Market Events: {len(market_events_df)} items")st.write(f"- Economic Calendar: {len(economic_calendar_df)} items")st.write(f"- Availability: Predictions={PREDICTIONS_AVAILABLE}, Sectoral={SECTORAL_AVAILABLE}, Events={EVENTS_AVAILABLE}, Calendar={CALENDAR_AVAILABLE}")if fetch_errors:st.write(f"- Errors: {len(fetch_errors)}")for err in fetch_errors:
61 unmodified lines6263646566676861 unmodified linesReturns:List of news items"""if source not in ['twitter', 'reddit', 'rss', 'ai_tech']:logger.error(f"Invalid source: {source}")return []61 unmodified lines6263646566676861 unmodified linesReturns:List of news items"""if source not in ['twitter', 'reddit', 'rss', 'ai_tech', 'predictions', 'sectoral_news', 'market_events', 'economic_calendar']:logger.error(f"Invalid source: {source}")return []
app/pages/05_Dashboard.py+7-2
app/utils/news_cache.py+1-1