Wajahat698 commited on
Commit
ec74958
·
verified ·
1 Parent(s): 1b7eec0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -601,13 +601,16 @@ if prompt :
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 and "**Suggestion**" not in cleaned_text:
608
  trust_tip = random.choice(trust_tips)
 
 
 
609
  suggestion = random.choice(suggestions)
610
- cleaned_text += f"\n\n**Trust Tip**: {trust_tip} \n\n **Suggestion**: {suggestion}"
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