Spaces:
Sleeping
Sleeping
redkye2
commited on
Commit
Β·
e8bb9e9
1
Parent(s):
01b30ae
test
Browse files
app.py
CHANGED
@@ -105,7 +105,7 @@ def get_conversation_chain(vectorstore):
|
|
105 |
# μ¬μ©μ μ
λ ₯μ μ²λ¦¬νλ ν¨μμ
λλ€.
|
106 |
def handle_userinput(user_question):
|
107 |
# λν 체μΈμ μ¬μ©νμ¬ μ¬μ©μ μ§λ¬Έμ λν μλ΅μ μμ±ν©λλ€.
|
108 |
-
response = st.
|
109 |
# λν κΈ°λ‘μ μ μ₯ν©λλ€.
|
110 |
st.session_state.chat_history = response['chat_history']
|
111 |
|
@@ -123,8 +123,8 @@ def main():
|
|
123 |
st.set_page_config(page_title="Chat with multiple Files",
|
124 |
page_icon=":books:")
|
125 |
st.write(css, unsafe_allow_html=True)
|
126 |
-
|
127 |
-
|
128 |
if "chat_history" not in st.session_state:
|
129 |
st.session_state.chat_history = None
|
130 |
|
@@ -168,7 +168,7 @@ def main():
|
|
168 |
vectorstore = get_vectorstore(text_chunks)
|
169 |
|
170 |
# create conversation chain
|
171 |
-
st.
|
172 |
vectorstore)
|
173 |
|
174 |
|
|
|
105 |
# μ¬μ©μ μ
λ ₯μ μ²λ¦¬νλ ν¨μμ
λλ€.
|
106 |
def handle_userinput(user_question):
|
107 |
# λν 체μΈμ μ¬μ©νμ¬ μ¬μ©μ μ§λ¬Έμ λν μλ΅μ μμ±ν©λλ€.
|
108 |
+
response = st.session_state.conversation(user_question)
|
109 |
# λν κΈ°λ‘μ μ μ₯ν©λλ€.
|
110 |
st.session_state.chat_history = response['chat_history']
|
111 |
|
|
|
123 |
st.set_page_config(page_title="Chat with multiple Files",
|
124 |
page_icon=":books:")
|
125 |
st.write(css, unsafe_allow_html=True)
|
126 |
+
if "conversation" not in st.session_state:
|
127 |
+
st.session_state.conversation = None
|
128 |
if "chat_history" not in st.session_state:
|
129 |
st.session_state.chat_history = None
|
130 |
|
|
|
168 |
vectorstore = get_vectorstore(text_chunks)
|
169 |
|
170 |
# create conversation chain
|
171 |
+
st.session_state.conversation = get_conversation_chain(
|
172 |
vectorstore)
|
173 |
|
174 |
|