Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -181,14 +181,17 @@ def main():
|
|
181 |
|
182 |
if submit_button:
|
183 |
with st.spinner("Generating response..."):
|
184 |
-
#
|
185 |
-
qa_chain, chat_history, response_answer, sources = conversation(
|
|
|
|
|
186 |
st.session_state['qa_chain'] = qa_chain
|
187 |
st.session_state['chat_history'] = chat_history
|
188 |
st.session_state['sources'] = sources
|
189 |
|
190 |
-
#
|
191 |
-
|
|
|
192 |
|
193 |
if __name__ == "__main__":
|
194 |
main()
|
|
|
181 |
|
182 |
if submit_button:
|
183 |
with st.spinner("Generating response..."):
|
184 |
+
# Process the form input
|
185 |
+
qa_chain, chat_history, response_answer, sources = conversation(
|
186 |
+
st.session_state['qa_chain'], message, st.session_state['chat_history']
|
187 |
+
)
|
188 |
st.session_state['qa_chain'] = qa_chain
|
189 |
st.session_state['chat_history'] = chat_history
|
190 |
st.session_state['sources'] = sources
|
191 |
|
192 |
+
# Clear the form input field by simply not including the key update
|
193 |
+
# The form input should be handled directly in the form submit button
|
194 |
+
st.experimental_rerun()
|
195 |
|
196 |
if __name__ == "__main__":
|
197 |
main()
|