Veda0718 commited on
Commit
b2ef992
·
verified ·
1 Parent(s): 4887552

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -123,12 +123,10 @@ user_input = st.text_input("Ask a question:", key="input")
123
 
124
  if st.button("Generate"):
125
  if user_input:
126
- print("User Input:", user_input) # Debug statement
127
  result = st.session_state.qa_chain(user_input)
128
- print("QA Chain Result:", result) # Debug statement
129
  answer = result["result"]
130
  st.session_state.history.append({"question": user_input, "answer": answer})
131
- st.session_state.input = "" # Clear input text after submission
132
  st.experimental_rerun()
133
 
134
  # Scroll to the bottom to display the latest message
 
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.experimental_rerun()
131
 
132
  # Scroll to the bottom to display the latest message