Update app.py
Browse files
app.py
CHANGED
|
@@ -627,24 +627,23 @@ if prompt :
|
|
| 627 |
|
| 628 |
trust_tip, suggestion = get_trust_tip_and_suggestion()
|
| 629 |
|
| 630 |
-
|
| 631 |
-
st.markdown(
|
| 632 |
-
st.markdown(
|
| 633 |
-
st.markdown(f"**
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
|
|
|
|
|
|
|
|
|
| 638 |
except Exception as e:
|
| 639 |
logger.error(f"Error generating response: {e}")
|
| 640 |
full_response = "I apologize, but an error occurred while generating the response. Please try again."
|
| 641 |
-
st.write(
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
"content": cleaned_text+combined_text,
|
| 648 |
-
|
| 649 |
-
})
|
| 650 |
-
copy_to_clipboard(cleaned_text)
|
|
|
|
| 627 |
|
| 628 |
trust_tip, suggestion = get_trust_tip_and_suggestion()
|
| 629 |
|
| 630 |
+
combined_text = f"{cleaned_text}\n\n---\n\n**Trust Tip**: {trust_tip}\n\n**Suggestion**: {suggestion}"
|
| 631 |
+
st.markdown(combined_text, unsafe_allow_html=True)
|
| 632 |
+
#seprtor= st.markdown("---") # Add a separator
|
| 633 |
+
#t_tip= st.markdown(f"**Trust Tip**: {trust_tip}")
|
| 634 |
+
#s_sug- st.markdown(f"**Suggestion**: {suggestion}")
|
| 635 |
+
|
| 636 |
+
|
| 637 |
+
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
|
| 641 |
except Exception as e:
|
| 642 |
logger.error(f"Error generating response: {e}")
|
| 643 |
full_response = "I apologize, but an error occurred while generating the response. Please try again."
|
| 644 |
+
st.write(full_response)
|
| 645 |
+
|
| 646 |
+
# Add AI response to chat history
|
| 647 |
+
|
| 648 |
+
st.session_state.chat_history.append({"role": "assistant", "content": combined_text})
|
| 649 |
+
copy_to_clipboard(combined_text)
|
|
|
|
|
|
|
|
|
|
|
|