Wajahat698 commited on
Commit
d3d9923
·
verified ·
1 Parent(s): 1ffc99c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -13
app.py CHANGED
@@ -198,19 +198,12 @@ def clean_text(text):
198
  cleaned_text = '\n\n'.join(para for para in cleaned_paragraphs if para)
199
 
200
  return cleaned_text
201
-
202
- def add_trust_tip_and_suggestion(cleaned_text):
203
- # Check if Trust Tip is already present
204
- if "**Trust Tip**" not in cleaned_text:
205
- trust_tip = random.choice(trust_tips)
206
- cleaned_text += f"\n\n**Trust Tip**: {trust_tip}"
207
-
208
- # Check if Suggestion is already present
209
- if "**Suggestion**" not in cleaned_text:
210
- suggestion = random.choice(suggestions)
211
- cleaned_text += f"\n\n**Suggestion**: {suggestion}"
212
-
213
- return cleaned_text
214
 
215
  def side():
216
  with st.sidebar.form(key='feedback_form'):
@@ -622,6 +615,10 @@ if prompt :
622
 
623
 
624
  st.write(final_text, unsafe_allow_html=True)
 
 
 
 
625
 
626
 
627
 
 
198
  cleaned_text = '\n\n'.join(para for para in cleaned_paragraphs if para)
199
 
200
  return cleaned_text
201
+ def get_trust_tip_and_suggestion():
202
+ trust_tip = random.choice(trust_tips)
203
+ suggestion = random.choice(suggestions)
204
+ return trust_tip, suggestion
205
+
206
+
 
 
 
 
 
 
 
207
 
208
  def side():
209
  with st.sidebar.form(key='feedback_form'):
 
615
 
616
 
617
  st.write(final_text, unsafe_allow_html=True)
618
+ st.markdown("---") # Add a separator
619
+ st.markdown(f"**Trust Tip**: {trust_tip}")
620
+ st.markdown(f"**Suggestion**: {suggestion}")
621
+
622
 
623
 
624