Spaces:
Runtime error
Runtime error
Commit
·
1ab4f11
1
Parent(s):
fee98e6
Initialized the session object to None
Browse files
app.py
CHANGED
@@ -101,7 +101,10 @@ def main():
|
|
101 |
|
102 |
if "conversation" not in st.session_state:
|
103 |
index = load_embeddings_and_index()
|
104 |
-
|
|
|
|
|
|
|
105 |
if "chat_history" not in st.session_state:
|
106 |
st.session_state.chat_history = None
|
107 |
|
|
|
101 |
|
102 |
if "conversation" not in st.session_state:
|
103 |
index = load_embeddings_and_index()
|
104 |
+
if index==None:
|
105 |
+
st.session_state.conversation = None
|
106 |
+
else:
|
107 |
+
st.session_state.conversation = get_conversation_chain(index)
|
108 |
if "chat_history" not in st.session_state:
|
109 |
st.session_state.chat_history = None
|
110 |
|