Commit Β·
7d36bac
1
Parent(s): e3b9cc7
Fix template loading problem
Browse files- src/streamlit_app.py +9 -5
src/streamlit_app.py
CHANGED
|
@@ -129,11 +129,15 @@ with st.sidebar:
|
|
| 129 |
|
| 130 |
c1, c2, c3 = st.columns([2, 1, 1])
|
| 131 |
with c1:
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
with c2:
|
| 138 |
country = st.selectbox("π Country", ["India"])
|
| 139 |
with c3:
|
|
|
|
| 129 |
|
| 130 |
c1, c2, c3 = st.columns([2, 1, 1])
|
| 131 |
with c1:
|
| 132 |
+
template_file = Path("Country_Risk_profile_template.xlsx")
|
| 133 |
+
if not template_file.exists():
|
| 134 |
+
template_file = Path("/app/Country_Risk_profile_template.xlsx")
|
| 135 |
+
|
| 136 |
+
if template_file.exists():
|
| 137 |
+
st.success("π Template loaded: Country_Risk_profile_template.xlsx")
|
| 138 |
+
st.session_state.template_path = str(template_file)
|
| 139 |
+
else:
|
| 140 |
+
st.error("β Template file not found in deployment.")
|
| 141 |
with c2:
|
| 142 |
country = st.selectbox("π Country", ["India"])
|
| 143 |
with c3:
|