RomyMy commited on
Commit
430ccfd
β€’
1 Parent(s): 4304dbd
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -77,7 +77,7 @@ def main():
77
 
78
  if "window_refreshed" not in st.session_state:
79
  st.session_state.window_refreshed = True
80
- st.session_state.chat_chain = present_products_chain()
81
 
82
  embedding_model = instance_embedding_model()
83
 
@@ -112,7 +112,7 @@ def main():
112
  result_output = ""
113
  for product in results.docs:
114
  result_output += f"product_name:{product.item_name}, product_description:{product.item_keywords} \n"
115
- result = st.session_state.chat_chain.predict(user_msg=f"{result_output}\n{prompt}")
116
  st.session_state.messages.append({"role": "assistant", "content": result})
117
  st.chat_message("assistant").write(result)
118
 
 
77
 
78
  if "window_refreshed" not in st.session_state:
79
  st.session_state.window_refreshed = True
80
+ st.session_state.present_products_chain = present_products_chain()
81
 
82
  embedding_model = instance_embedding_model()
83
 
 
112
  result_output = ""
113
  for product in results.docs:
114
  result_output += f"product_name:{product.item_name}, product_description:{product.item_keywords} \n"
115
+ result = st.session_state.present_products_chain.predict(user_msg=f"{result_output}\n{prompt}")
116
  st.session_state.messages.append({"role": "assistant", "content": result})
117
  st.chat_message("assistant").write(result)
118