Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -100,9 +100,6 @@ def main():
|
|
100 |
st.header("Chat with multiple Files :")
|
101 |
user_question = st.text_input("Ask a question about your documents:")
|
102 |
|
103 |
-
if user_question:
|
104 |
-
handle_userinput(user_question)
|
105 |
-
|
106 |
with st.sidebar:
|
107 |
st.subheader("Your documents")
|
108 |
docs = st.file_uploader(
|
@@ -128,6 +125,9 @@ def main():
|
|
128 |
vectorstore = get_vectorstore(text_chunks)
|
129 |
st.session_state.conversation = get_conversation_chain(vectorstore)
|
130 |
|
|
|
|
|
|
|
131 |
|
132 |
if __name__ == '__main__':
|
133 |
-
main()
|
|
|
100 |
st.header("Chat with multiple Files :")
|
101 |
user_question = st.text_input("Ask a question about your documents:")
|
102 |
|
|
|
|
|
|
|
103 |
with st.sidebar:
|
104 |
st.subheader("Your documents")
|
105 |
docs = st.file_uploader(
|
|
|
125 |
vectorstore = get_vectorstore(text_chunks)
|
126 |
st.session_state.conversation = get_conversation_chain(vectorstore)
|
127 |
|
128 |
+
if user_question and st.session_state.conversation: # 대화 체인이 있을 때만 사용자 입력 처리
|
129 |
+
handle_userinput(user_question)
|
130 |
+
|
131 |
|
132 |
if __name__ == '__main__':
|
133 |
+
main()
|