Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,9 @@ from pymongo import MongoClient
|
|
8 |
from streamlit_option_menu import option_menu
|
9 |
import pandas as pd
|
10 |
|
|
|
|
|
|
|
11 |
uri = os.environ.get("MONGO_CONNECTION_STRING")
|
12 |
conn = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
|
13 |
|
@@ -40,9 +43,10 @@ def chatbot():
|
|
40 |
with st.chat_message("assistant"):
|
41 |
st.write(umsg)
|
42 |
|
43 |
-
|
44 |
-
with st.sidebar:
|
45 |
-
|
|
|
46 |
if selected == "Chatbot":
|
47 |
chatbot()
|
48 |
elif selected == "View Reminders":
|
|
|
8 |
from streamlit_option_menu import option_menu
|
9 |
import pandas as pd
|
10 |
|
11 |
+
if "user" not in st.session_state:
|
12 |
+
st.session_state.user == "Guest"
|
13 |
+
|
14 |
uri = os.environ.get("MONGO_CONNECTION_STRING")
|
15 |
conn = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
|
16 |
|
|
|
43 |
with st.chat_message("assistant"):
|
44 |
st.write(umsg)
|
45 |
|
46 |
+
if st.session_state.user == "Guest"
|
47 |
+
with st.sidebar:
|
48 |
+
selected = option_menu(None, options=["Chatbot", "View Reminders"])
|
49 |
+
|
50 |
if selected == "Chatbot":
|
51 |
chatbot()
|
52 |
elif selected == "View Reminders":
|