Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,11 +123,11 @@ user_input = st.text_input("Ask a question:", key="input")
|
|
| 123 |
|
| 124 |
if st.button("Generate"):
|
| 125 |
if user_input:
|
| 126 |
-
print("Button Clicked:", st.button("Submit")) # Debug statement
|
| 127 |
result = st.session_state.qa_chain(user_input)
|
| 128 |
answer = result["result"]
|
| 129 |
st.session_state.history.append({"question": user_input, "answer": answer})
|
| 130 |
-
st.
|
|
|
|
| 131 |
|
| 132 |
# Scroll to the bottom to display the latest message
|
| 133 |
st.markdown(
|
|
|
|
| 123 |
|
| 124 |
if st.button("Generate"):
|
| 125 |
if user_input:
|
|
|
|
| 126 |
result = st.session_state.qa_chain(user_input)
|
| 127 |
answer = result["result"]
|
| 128 |
st.session_state.history.append({"question": user_input, "answer": answer})
|
| 129 |
+
st.session_state.update({"input": ""})
|
| 130 |
+
st.rerun()
|
| 131 |
|
| 132 |
# Scroll to the bottom to display the latest message
|
| 133 |
st.markdown(
|