Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,6 +76,9 @@ from langchain.prompts import PromptTemplate
|
|
76 |
from langchain.prompts import PromptTemplate
|
77 |
from langchain.chains import LLMChain
|
78 |
|
|
|
|
|
|
|
79 |
def create_chain(vectorstores, mentality_traits):
|
80 |
# Create style prompt dynamically based on mentality traits
|
81 |
style_prompt = (
|
@@ -116,8 +119,6 @@ def create_chain(vectorstores, mentality_traits):
|
|
116 |
|
117 |
return chain
|
118 |
|
119 |
-
|
120 |
-
|
121 |
# Streamlit setup
|
122 |
st.set_page_config(
|
123 |
page_title="Chat with your documents",
|
@@ -166,5 +167,3 @@ if user_input:
|
|
166 |
st.session_state.chat_history.append({"role": "assistant", "content": assistant_response})
|
167 |
with st.chat_message("assistant"):
|
168 |
st.markdown(assistant_response)
|
169 |
-
|
170 |
-
|
|
|
76 |
from langchain.prompts import PromptTemplate
|
77 |
from langchain.chains import LLMChain
|
78 |
|
79 |
+
from langchain.prompts import PromptTemplate
|
80 |
+
from langchain.chains import LLMChain
|
81 |
+
|
82 |
def create_chain(vectorstores, mentality_traits):
|
83 |
# Create style prompt dynamically based on mentality traits
|
84 |
style_prompt = (
|
|
|
119 |
|
120 |
return chain
|
121 |
|
|
|
|
|
122 |
# Streamlit setup
|
123 |
st.set_page_config(
|
124 |
page_title="Chat with your documents",
|
|
|
167 |
st.session_state.chat_history.append({"role": "assistant", "content": assistant_response})
|
168 |
with st.chat_message("assistant"):
|
169 |
st.markdown(assistant_response)
|
|
|
|