Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -601,13 +601,16 @@ if prompt :
|
|
| 601 |
cleaned_text = clean_text(full_response)
|
| 602 |
|
| 603 |
|
| 604 |
-
|
| 605 |
-
|
| 606 |
# Display the response
|
| 607 |
-
if "**Trust Tip**" not in cleaned_text
|
| 608 |
trust_tip = random.choice(trust_tips)
|
|
|
|
|
|
|
|
|
|
| 609 |
suggestion = random.choice(suggestions)
|
| 610 |
-
cleaned_text += f"\n\n**
|
| 611 |
|
| 612 |
st.markdown(cleaned_text, unsafe_allow_html=True)
|
| 613 |
|
|
|
|
| 601 |
cleaned_text = clean_text(full_response)
|
| 602 |
|
| 603 |
|
| 604 |
+
cleaned_text = re.sub(r'</span>', '', cleaned_text)
|
| 605 |
+
cleaned_text = re.sub(r'<span[^>]*>', '', cleaned_text)
|
| 606 |
# Display the response
|
| 607 |
+
if "**Trust Tip**" not in cleaned_text:
|
| 608 |
trust_tip = random.choice(trust_tips)
|
| 609 |
+
cleaned_text += f"\n\n**Trust Tip**: {trust_tip}"
|
| 610 |
+
|
| 611 |
+
if "**Suggestion**" not in cleaned_text:
|
| 612 |
suggestion = random.choice(suggestions)
|
| 613 |
+
cleaned_text += f"\n\n**Suggestion**: {suggestion}"
|
| 614 |
|
| 615 |
st.markdown(cleaned_text, unsafe_allow_html=True)
|
| 616 |
|