Spaces:
Build error
Build error
Update app.py
Browse files
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 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 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 |
|