Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -842,70 +842,83 @@ def side():
|
|
| 842 |
st.warning("Please fill all fields")
|
| 843 |
|
| 844 |
with col2:
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
button {
|
| 848 |
-
background-color: rgb(82, 129, 134) !important;
|
| 849 |
-
color: white !important;
|
| 850 |
-
border: none !important;
|
| 851 |
-
padding: 8px 16px !important;
|
| 852 |
-
font-size: 14px !important;
|
| 853 |
-
border-radius: 5px !important;
|
| 854 |
-
cursor: pointer !important;
|
| 855 |
-
font-family: Arial, sans-serif !important;
|
| 856 |
-
}
|
| 857 |
-
button:hover {
|
| 858 |
-
background-color: rgb(70, 115, 119) !important;
|
| 859 |
-
}
|
| 860 |
-
</style>
|
| 861 |
-
"""
|
| 862 |
-
st.markdown(custom_css, unsafe_allow_html=True)
|
| 863 |
-
letai_allocate_clicked = st.button("LetAI Allocate", key="letai_allocate_button")
|
| 864 |
-
|
| 865 |
-
if letai_allocate_clicked:
|
| 866 |
-
# Display the pop-up message
|
| 867 |
-
popup_css = """
|
| 868 |
<style>
|
| 869 |
-
|
| 870 |
-
|
| 871 |
-
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
1. Type your TrustBuilder® in the chat.<br><br>
|
| 898 |
-
2. If you're unsure of the TrustBucket®, ask the AI:<br>
|
| 899 |
-
<i>"Hey, which TrustBucket does this TrustBuilder® belong to?"</i><br><br>
|
| 900 |
-
3. Save it using the following format:<br>
|
| 901 |
-
<code>Save this as a TrustBuilder. [BucketName]. [TrustBuilder Text]</code><br><br>
|
| 902 |
-
<b>Example:</b><br>
|
| 903 |
-
<code>Save this as a TrustBuilder. Stability. We focus on keeping and nurturing our team.</code>
|
| 904 |
-
</div>
|
| 905 |
-
""", unsafe_allow_html=True)
|
| 906 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 908 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 909 |
|
| 910 |
|
| 911 |
|
|
|
|
| 842 |
st.warning("Please fill all fields")
|
| 843 |
|
| 844 |
with col2:
|
| 845 |
+
|
| 846 |
+
tooltip_css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
<style>
|
| 848 |
+
/* Tooltip container styling */
|
| 849 |
+
.tooltip-container {
|
| 850 |
+
position: relative;
|
| 851 |
+
display: inline-block;
|
| 852 |
+
vertical-align: top;
|
| 853 |
+
width: 100%;
|
| 854 |
+
margin-top: -15px; /* Aligns with st.button */
|
| 855 |
+
}
|
| 856 |
+
|
| 857 |
+
/* Tooltip text styling */
|
| 858 |
+
.tooltip-container .tooltiptext {
|
| 859 |
+
visibility: hidden;
|
| 860 |
+
width: 300px; /* Fixed width for better readability */
|
| 861 |
+
max-width: 90%; /* Ensure tooltip fits within sidebar */
|
| 862 |
+
background-color: #f9f9f9;
|
| 863 |
+
color: #333;
|
| 864 |
+
text-align: left;
|
| 865 |
+
border-radius: 8px;
|
| 866 |
+
padding: 10px;
|
| 867 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 868 |
+
position: absolute;
|
| 869 |
+
z-index: 1000; /* Ensure tooltip is above other elements */
|
| 870 |
+
top: calc(100% + 10px); /* Position tooltip below the button with spacing */
|
| 871 |
+
left: 50%; /* Center horizontally */
|
| 872 |
+
transform: translateX(-50%);
|
| 873 |
+
opacity: 0;
|
| 874 |
+
transition: opacity 0.3s ease-in-out;
|
| 875 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 876 |
|
| 877 |
+
/* Show tooltip on hover */
|
| 878 |
+
.tooltip-container:hover .tooltiptext {
|
| 879 |
+
visibility: visible;
|
| 880 |
+
opacity: 1;
|
| 881 |
+
}
|
| 882 |
|
| 883 |
+
/* Button styling */
|
| 884 |
+
.tooltip-container button {
|
| 885 |
+
background-color: rgb(82, 129, 134);
|
| 886 |
+
color: white;
|
| 887 |
+
border: none;
|
| 888 |
+
padding: 8px 16px;
|
| 889 |
+
font-size: 14px;
|
| 890 |
+
border-radius: 5px;
|
| 891 |
+
cursor: pointer;
|
| 892 |
+
box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
|
| 893 |
+
font-family: Arial, sans-serif;
|
| 894 |
+
}
|
| 895 |
|
| 896 |
+
/* Hover effect for button */
|
| 897 |
+
.tooltip-container button:hover {
|
| 898 |
+
background-color: rgb(70, 115, 119);
|
| 899 |
+
}
|
| 900 |
+
</style>
|
| 901 |
+
"""
|
| 902 |
+
|
| 903 |
+
# Inject CSS
|
| 904 |
+
st.markdown(tooltip_css, unsafe_allow_html=True)
|
| 905 |
+
|
| 906 |
+
# Tooltip Button
|
| 907 |
+
st.markdown("""
|
| 908 |
+
<div class="tooltip-container">
|
| 909 |
+
<button>LetAI Allocate</button>
|
| 910 |
+
<span class="tooltiptext">
|
| 911 |
+
<b>Here’s how you can save your TrustBuilder®:</b><br><br>
|
| 912 |
+
1. Type your TrustBuilder® in the chat.<br>
|
| 913 |
+
2. If unsure of the TrustBucket®, ask the AI:<br>
|
| 914 |
+
<i>"Hey, which TrustBucket does this TrustBuilder® belong to?"</i><br><br>
|
| 915 |
+
3. Save it using the following format:<br>
|
| 916 |
+
<code>Save this as a TrustBuilder. [BucketName]. [TrustBuilder Text]</code><br><br>
|
| 917 |
+
Example:<br>
|
| 918 |
+
<code>Save this as a TrustBuilder. Stability. We focus on keeping and nurturing our team.</code>
|
| 919 |
+
</span>
|
| 920 |
+
</div>
|
| 921 |
+
""", unsafe_allow_html=True)
|
| 922 |
|
| 923 |
|
| 924 |
|