Update pages/3_Earnings_Semantic_Search_π_.py
Browse files
pages/3_Earnings_Semantic_Search_π_.py
CHANGED
@@ -104,12 +104,11 @@ try:
|
|
104 |
embedding_model = bi_enc_dict[sbert_model_name]
|
105 |
|
106 |
with st.spinner(
|
107 |
-
text=f"Loading {embedding_model} embedding model and
|
108 |
):
|
109 |
|
110 |
docsearch = create_vectorstore(earnings_text,title, embedding_model)
|
111 |
|
112 |
-
memory, agent_executor = create_memory_and_agent(search_input,docsearch)
|
113 |
|
114 |
if "messages" not in st.session_state or st.sidebar.button("Clear message history"):
|
115 |
st.session_state["messages"] = [AIMessage(content=starter_message)]
|
@@ -127,6 +126,8 @@ try:
|
|
127 |
with st.chat_message("assistant"):
|
128 |
|
129 |
st_callback = StreamlitCallbackHandler(st.container())
|
|
|
|
|
130 |
|
131 |
response = agent_executor(
|
132 |
{"input": user_question, "history": st.session_state.messages},
|
|
|
104 |
embedding_model = bi_enc_dict[sbert_model_name]
|
105 |
|
106 |
with st.spinner(
|
107 |
+
text=f"Loading {embedding_model} embedding model and creating vectorstore..."
|
108 |
):
|
109 |
|
110 |
docsearch = create_vectorstore(earnings_text,title, embedding_model)
|
111 |
|
|
|
112 |
|
113 |
if "messages" not in st.session_state or st.sidebar.button("Clear message history"):
|
114 |
st.session_state["messages"] = [AIMessage(content=starter_message)]
|
|
|
126 |
with st.chat_message("assistant"):
|
127 |
|
128 |
st_callback = StreamlitCallbackHandler(st.container())
|
129 |
+
|
130 |
+
memory, agent_executor = create_memory_and_agent(user_question,docsearch)
|
131 |
|
132 |
response = agent_executor(
|
133 |
{"input": user_question, "history": st.session_state.messages},
|