Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -798,7 +798,50 @@ def side():
|
|
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 802 |
search_query = st.text_input("Search by keyword", key="search_query")
|
| 803 |
st.write("or")
|
| 804 |
search_query = st.text_input("Search by Brand/Product/Person", key="search_query1")
|
|
@@ -1571,7 +1614,7 @@ def handle_memory_queries(prompt):
|
|
| 1571 |
return None
|
| 1572 |
|
| 1573 |
# Retrieve saved TrustBuilders
|
| 1574 |
-
elif "show my saved trustbuilders" in prompt or "
|
| 1575 |
trustbuilders = st.session_state.get("TrustBuilder", {})
|
| 1576 |
if trustbuilders:
|
| 1577 |
response = "\n".join([f"- {entry['message']}" for entry in trustbuilders.values()])
|
|
|
|
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
+
st.markdown("""
|
| 802 |
+
<style>
|
| 803 |
+
.info-icon {
|
| 804 |
+
display: inline-block;
|
| 805 |
+
margin-left: 8px;
|
| 806 |
+
color: #007BFF;
|
| 807 |
+
cursor: pointer;
|
| 808 |
+
position: relative;
|
| 809 |
+
}
|
| 810 |
+
.tooltip {
|
| 811 |
+
visibility: hidden;
|
| 812 |
+
width: 250px;
|
| 813 |
+
background-color: #555;
|
| 814 |
+
color: #fff;
|
| 815 |
+
text-align: center;
|
| 816 |
+
border-radius: 5px;
|
| 817 |
+
padding: 5px;
|
| 818 |
+
position: absolute;
|
| 819 |
+
z-index: 1;
|
| 820 |
+
bottom: 125%; /* Position above the icon */
|
| 821 |
+
left: 50%;
|
| 822 |
+
margin-left: -125px; /* Center the tooltip */
|
| 823 |
+
opacity: 0;
|
| 824 |
+
transition: opacity 0.3s;
|
| 825 |
+
}
|
| 826 |
+
.info-icon:hover .tooltip {
|
| 827 |
+
visibility: visible;
|
| 828 |
+
opacity: 1;
|
| 829 |
+
}
|
| 830 |
+
</style>
|
| 831 |
+
""", unsafe_allow_html=True)
|
| 832 |
+
|
| 833 |
+
# Add the header with the info icon and hover effect
|
| 834 |
+
st.markdown("""
|
| 835 |
+
<div style="display: flex; align-items: center;">
|
| 836 |
+
<h3>Show My TrustBuilders®</h3>
|
| 837 |
+
<div class="info-icon">
|
| 838 |
+
ℹ️
|
| 839 |
+
<span class="tooltip">You can ask AI to find your TrustBuilders® also by prompting "show my saved trustbuilders".</span>
|
| 840 |
+
</div>
|
| 841 |
+
</div>
|
| 842 |
+
""", unsafe_allow_html=True)
|
| 843 |
+
|
| 844 |
+
|
| 845 |
search_query = st.text_input("Search by keyword", key="search_query")
|
| 846 |
st.write("or")
|
| 847 |
search_query = st.text_input("Search by Brand/Product/Person", key="search_query1")
|
|
|
|
| 1614 |
return None
|
| 1615 |
|
| 1616 |
# Retrieve saved TrustBuilders
|
| 1617 |
+
elif "show my saved trustbuilders" in prompt or "show my saved trustbuilders" in prompt:
|
| 1618 |
trustbuilders = st.session_state.get("TrustBuilder", {})
|
| 1619 |
if trustbuilders:
|
| 1620 |
response = "\n".join([f"- {entry['message']}" for entry in trustbuilders.values()])
|