Wajahat698 commited on
Commit
1869432
·
verified ·
1 Parent(s): 84949dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- full_response += f"\n\n**Trust Tip**: {trust_tip} \n\n **Suggestion**: {suggestion}"
538
 
539
- st.markdown(full_response, unsafe_allow_html=True)
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