Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -529,14 +529,15 @@ if prompt :
|
|
| 529 |
})
|
| 530 |
full_response = output["output"]
|
| 531 |
|
| 532 |
-
|
|
|
|
| 533 |
# Display the response
|
| 534 |
if "**Trust Tip**" not in full_response and "**Suggestion**" not in full_response:
|
| 535 |
trust_tip = random.choice(trust_tips)
|
| 536 |
suggestion = random.choice(suggestions)
|
| 537 |
-
|
| 538 |
|
| 539 |
-
st.markdown(
|
| 540 |
|
| 541 |
|
| 542 |
|
|
|
|
| 529 |
})
|
| 530 |
full_response = output["output"]
|
| 531 |
|
| 532 |
+
soup = BeautifulSoup(full_response, 'html.parser')
|
| 533 |
+
cleaned_text = soup.get_text()
|
| 534 |
# Display the response
|
| 535 |
if "**Trust Tip**" not in full_response and "**Suggestion**" not in full_response:
|
| 536 |
trust_tip = random.choice(trust_tips)
|
| 537 |
suggestion = random.choice(suggestions)
|
| 538 |
+
cleaned_text += f"\n\n**Trust Tip**: {trust_tip} \n\n **Suggestion**: {suggestion}"
|
| 539 |
|
| 540 |
+
st.markdown(cleaned_text, unsafe_allow_html=True)
|
| 541 |
|
| 542 |
|
| 543 |
|