Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2266,16 +2266,13 @@ def handle_prompt(prompt):
|
|
| 2266 |
|
| 2267 |
#formatted_text = clean_and_format_markdown(cleaned_text)
|
| 2268 |
|
| 2269 |
-
if "Trust Tip" not in full_response and "Suggestion" not in full_response:
|
| 2270 |
# Retrieve Trust Tip and Suggestion only if not already present
|
| 2271 |
-
|
| 2272 |
|
| 2273 |
# Combine the response text with Trust Tip and Suggestion
|
| 2274 |
-
|
| 2275 |
|
| 2276 |
-
|
| 2277 |
-
# If already present, just use the full response
|
| 2278 |
-
combined_text = full_response
|
| 2279 |
with response_placeholder:
|
| 2280 |
with st.chat_message("assistant"):
|
| 2281 |
st.markdown(full_response, unsafe_allow_html=True)
|
|
|
|
| 2266 |
|
| 2267 |
#formatted_text = clean_and_format_markdown(cleaned_text)
|
| 2268 |
|
|
|
|
| 2269 |
# Retrieve Trust Tip and Suggestion only if not already present
|
| 2270 |
+
trust_tip, suggestion = get_trust_tip_and_suggestion()
|
| 2271 |
|
| 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)
|