Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,9 +60,6 @@ with st.sidebar:
|
|
| 60 |
|
| 61 |
st.success("β
API key validated successfully")
|
| 62 |
|
| 63 |
-
# π Force rerun to show model selector immediately
|
| 64 |
-
st.experimental_rerun()
|
| 65 |
-
|
| 66 |
except Exception as e:
|
| 67 |
error_msg = str(e).lower()
|
| 68 |
if "401" in error_msg or "403" in error_msg or "unauthorized" in error_msg:
|
|
@@ -72,7 +69,7 @@ with st.sidebar:
|
|
| 72 |
st.caption(str(e))
|
| 73 |
|
| 74 |
# ---------- AFTER VALIDATION ----------
|
| 75 |
-
|
| 76 |
st.success("π API Key validated (hidden)")
|
| 77 |
|
| 78 |
st.selectbox(
|
|
|
|
| 60 |
|
| 61 |
st.success("β
API key validated successfully")
|
| 62 |
|
|
|
|
|
|
|
|
|
|
| 63 |
except Exception as e:
|
| 64 |
error_msg = str(e).lower()
|
| 65 |
if "401" in error_msg or "403" in error_msg or "unauthorized" in error_msg:
|
|
|
|
| 69 |
st.caption(str(e))
|
| 70 |
|
| 71 |
# ---------- AFTER VALIDATION ----------
|
| 72 |
+
if st.session_state.api_validated:
|
| 73 |
st.success("π API Key validated (hidden)")
|
| 74 |
|
| 75 |
st.selectbox(
|