shivanis14
commited on
Commit
•
9313499
1
Parent(s):
f3f4df9
Update app.py
Browse files
app.py
CHANGED
@@ -631,10 +631,14 @@ def main():
|
|
631 |
SessionState.initialize() # Reset states for next product
|
632 |
st.session_state.welcome_msg = "What is the next product you would like me to analyze today?"
|
633 |
st.rerun()
|
|
|
634 |
elif response: # Only add response if it's not None
|
635 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
636 |
with st.chat_message("assistant"):
|
637 |
st.markdown(response)
|
|
|
|
|
|
|
638 |
else:
|
639 |
# Disable chat input while selection is in progress
|
640 |
st.chat_input("Please confirm your selection above first...", disabled=True)
|
|
|
631 |
SessionState.initialize() # Reset states for next product
|
632 |
st.session_state.welcome_msg = "What is the next product you would like me to analyze today?"
|
633 |
st.rerun()
|
634 |
+
|
635 |
elif response: # Only add response if it's not None
|
636 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
637 |
with st.chat_message("assistant"):
|
638 |
st.markdown(response)
|
639 |
+
print(f"DEBUG : st.session_state.awaiting_selection : {st.session_state.awaiting_selection}")
|
640 |
+
print(f"response : {response}")
|
641 |
+
st.rerun()
|
642 |
else:
|
643 |
# Disable chat input while selection is in progress
|
644 |
st.chat_input("Please confirm your selection above first...", disabled=True)
|