From cdbb45bc34f33992dcedca41f197d22faeff7b94 Mon Sep 17 00:00:00 2001 From: Pratham Soni Date: Thu, 13 Jun 2024 11:33:47 -0500 Subject: [PATCH] interface 2 session expirty redirect --- streamlit/interface_2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/streamlit/interface_2.py b/streamlit/interface_2.py index 6824dab..003f37b 100644 --- a/streamlit/interface_2.py +++ b/streamlit/interface_2.py @@ -1,5 +1,5 @@ import json - +import security import boto3 from langchain.prompts import PromptTemplate from langchain.embeddings.bedrock import BedrockEmbeddings @@ -65,6 +65,9 @@ try: user_mail = st.session_state.user_info['mail'] except KeyError as e: st.write("Session Expired.") + #st.write("Please sign-in to use this app.") + auth_url = security.get_auth_url(REDIRECT_URI) + st.markdown(f"Sign In", unsafe_allow_html=True) st.stop() # remove below try except statement if comparison with actual vales is not required