Edwin Salguero
commited on
Commit
·
ec06fe8
1
Parent(s):
5745bd6
Fix st.secrets assignment error - remove read-only assignment and only set os.environ
Browse files- streamlit_app.py +1 -2
streamlit_app.py
CHANGED
|
@@ -13,9 +13,8 @@ if not fred_key:
|
|
| 13 |
st.error("❌ FRED API not available. Please configure your FRED_API_KEY.")
|
| 14 |
st.stop()
|
| 15 |
|
| 16 |
-
# 3. Propagate it into the actual env
|
| 17 |
os.environ["FRED_API_KEY"] = fred_key
|
| 18 |
-
st.secrets["FRED_API_KEY"] = fred_key # so any direct st.secrets lookup also works
|
| 19 |
|
| 20 |
# 4. Now hook up your frontend code
|
| 21 |
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
| 13 |
st.error("❌ FRED API not available. Please configure your FRED_API_KEY.")
|
| 14 |
st.stop()
|
| 15 |
|
| 16 |
+
# 3. Propagate it into the actual env namespace only
|
| 17 |
os.environ["FRED_API_KEY"] = fred_key
|
|
|
|
| 18 |
|
| 19 |
# 4. Now hook up your frontend code
|
| 20 |
HERE = os.path.dirname(os.path.abspath(__file__))
|