Edwin Salguero commited on
Commit ·
6b72109
1
Parent(s): ec06fe8
Remove pre-flight FRED API key check - rely on REAL_DATA_MODE after load_config()
Browse files424 unmodified lines425426427428429430431432433434435436437438439440441442443424 unmodified linesdef main():"""Main Streamlit application"""# Check for FRED API key firstfred_key = os.getenv("FRED_API_KEY") or st.secrets.get("FRED_API_KEY")if not fred_key:st.error("❌ FRED API not available. Please configure your FRED API key.")st.info("Get a free FRED API key at: https://fred.stlouisfed.org/docs/api/api_key.html")st.stop()# Show loading indicatorwith st.spinner("🚀 Initializing FRED ML Platform..."):# Load configurationload_config()load_fred_client()load_analytics()# Force analytics to be available if loading succeededif ANALYTICS_AVAILABLE:424 unmodified lines425426427428429430431432433434435436437438439440441424 unmodified linesdef main():"""Main Streamlit application"""# Show loading indicator and load everythingwith st.spinner("🚀 Initializing FRED ML Platform..."):load_config() # pulls from os.environ or st.secretsload_fred_client() # sets FRED_API_AVAILABLEload_analytics() # sets ANALYTICS_AVAILABLE# Now check whether we're actually in "real data" modeif not REAL_DATA_MODE:st.error("❌ FRED API key not configured. Please set FRED_API_KEY environment variable.")st.info("Get a free FRED API key at: https://fred.stlouisfed.org/docs/api/api_key.html")st.stop()# Force analytics to be available if loading succeededif ANALYTICS_AVAILABLE:
frontend/app.py+9-11