Wajahat698 commited on
Commit
d3d7282
·
verified ·
1 Parent(s): ba3e3d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -2272,13 +2272,16 @@ def handle_prompt(prompt):
2272
  # Combine the response text with Trust Tip and Suggestion
2273
  combined_text = f"{full_response}\n\n---\n\n**Trust Tip**: {trust_tip}\n\n**Suggestion**: {suggestion}"
2274
 
2275
-
 
 
2276
  with response_placeholder:
2277
  with st.chat_message("assistant"):
2278
- st.markdown(full_response, unsafe_allow_html=True)
 
2279
 
2280
  #st.write(combined_text,unsafe_allow_html=True)
2281
- st.session_state.chat_history.append({"role": "assistant", "content": combined_text})
2282
  copy_to_clipboard(combined_text)
2283
 
2284
 
 
2272
  # Combine the response text with Trust Tip and Suggestion
2273
  combined_text = f"{full_response}\n\n---\n\n**Trust Tip**: {trust_tip}\n\n**Suggestion**: {suggestion}"
2274
 
2275
+ escaped_output = html.escape(combined_text)
2276
+
2277
+
2278
  with response_placeholder:
2279
  with st.chat_message("assistant"):
2280
+
2281
+ st.markdown(escaped_output, unsafe_allow_html=True)
2282
 
2283
  #st.write(combined_text,unsafe_allow_html=True)
2284
+ st.session_state.chat_history.append({"role": "assistant", "content": escaped_output})
2285
  copy_to_clipboard(combined_text)
2286
 
2287