Wajahat698 commited on
Commit
0e4bb69
·
verified ·
1 Parent(s): 6303851

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -1876,10 +1876,13 @@ def handle_prompt(prompt):
1876
  st.session_state.chat_history.append({"role": "assistant", "content": response})
1877
  with st.chat_message("assistant"):
1878
  st.markdown(response)
1879
- else:
1880
- # Prompt user to provide content if missing
1881
- with st.chat_message("assistant"):
1882
- st.markdown("Please provide the content to save as a TrustBuilder.")
 
 
 
1883
 
1884
  # Mark as handled and exit to prevent further processing
1885
  st.session_state["handled"] = True
 
1876
  st.session_state.chat_history.append({"role": "assistant", "content": response})
1877
  with st.chat_message("assistant"):
1878
  st.markdown(response)
1879
+ st.session_state["handled"] = True
1880
+ return
1881
+
1882
+ else:
1883
+ # Prompt user to provide content if missing
1884
+ with st.chat_message("assistant"):
1885
+ st.markdown("Please provide the content to save as a TrustBuilder.")
1886
 
1887
  # Mark as handled and exit to prevent further processing
1888
  st.session_state["handled"] = True