Update src/streamlit_app.py
Browse files925 unmodified lines926927928929930931932933934935936937938939925 unmodified lines# -------------------------# 3. Role selection and contextual info# -------------------------role = st.selectbox("Select Your Role", list(roles.keys()), index=10)st.caption(f" Context: {roles[role]}")if not recs:st.warning("Please run the AutoML + SHAP step first to generate recommendations.")else:generate_clicked = st.button("Generate Role-Based Advisory")if generate_clicked and not st.session_state.get("hf_ran_once", False):st.session_state["hf_ran_once"] = TrueHF_TOKEN = os.getenv("HF_TOKEN")if not HF_TOKEN:925 unmodified lines926927928929930931932933934935936937938939940941925 unmodified lines# -------------------------# 3. Role selection and contextual info# -------------------------role = st.selectbox("Select Your Role", list(roles.keys()), index=10, key="selected_role")if "last_role" in st.session_state and st.session_state["last_role"] != role:st.session_state["hf_ran_once"] = Falsest.caption(f" Context: {roles[role]}")if not recs:st.warning("Please run the AutoML + SHAP step first to generate recommendations.")else:generate_clicked = st.button("Generate Role-Based Advisory")if generate_clicked:st.session_state["hf_ran_once"] = TrueHF_TOKEN = os.getenv("HF_TOKEN")if not HF_TOKEN:
src/streamlit_app.py+4-2