Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -838,59 +838,63 @@ def side():
|
|
| 838 |
# CSS for "AI Allocate" Button with Tooltip
|
| 839 |
tooltip_css = """
|
| 840 |
<style>
|
| 841 |
-
|
|
|
|
| 842 |
position: relative;
|
| 843 |
display: inline-block;
|
| 844 |
-
|
| 845 |
-
|
| 846 |
}
|
| 847 |
-
|
|
|
|
|
|
|
| 848 |
visibility: hidden;
|
| 849 |
-
width:
|
| 850 |
background-color: #f9f9f9;
|
| 851 |
color: #333;
|
| 852 |
text-align: left;
|
| 853 |
border-radius: 8px;
|
| 854 |
padding: 10px;
|
| 855 |
-
box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
|
| 856 |
position: absolute;
|
| 857 |
z-index: 1;
|
| 858 |
-
bottom:
|
| 859 |
left: 50%;
|
| 860 |
transform: translateX(-50%);
|
| 861 |
opacity: 0;
|
| 862 |
transition: opacity 0.3s;
|
| 863 |
}
|
| 864 |
-
|
|
|
|
|
|
|
| 865 |
visibility: visible;
|
| 866 |
opacity: 1;
|
| 867 |
}
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
|
| 871 |
-
color:
|
|
|
|
| 872 |
border: none;
|
| 873 |
-
padding:
|
| 874 |
-
font-size:
|
| 875 |
-
|
| 876 |
-
border-radius: 8px;
|
| 877 |
cursor: pointer;
|
| 878 |
-
box-shadow: 0px 4px 8px rgba(0,0,0,0.
|
| 879 |
-
|
| 880 |
}
|
| 881 |
-
|
| 882 |
-
|
|
|
|
| 883 |
}
|
| 884 |
</style>
|
| 885 |
"""
|
| 886 |
-
|
| 887 |
-
# Inject the
|
| 888 |
st.markdown(tooltip_css, unsafe_allow_html=True)
|
| 889 |
-
|
| 890 |
-
# Tooltip button
|
| 891 |
tooltip_html = """
|
| 892 |
-
<div class="tooltip">
|
| 893 |
-
<button>
|
| 894 |
<span class="tooltiptext">
|
| 895 |
<b>Let AI help you allocate the TrustBuilder®:</b><br><br>
|
| 896 |
1. AI will analyze the TrustBuilder® text.<br>
|
|
@@ -900,12 +904,8 @@ def side():
|
|
| 900 |
</div>
|
| 901 |
"""
|
| 902 |
st.markdown(tooltip_html, unsafe_allow_html=True)
|
|
|
|
| 903 |
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
|
| 909 |
|
| 910 |
|
| 911 |
|
|
|
|
| 838 |
# CSS for "AI Allocate" Button with Tooltip
|
| 839 |
tooltip_css = """
|
| 840 |
<style>
|
| 841 |
+
/* Container for tooltip and button */
|
| 842 |
+
.tooltip-container {
|
| 843 |
position: relative;
|
| 844 |
display: inline-block;
|
| 845 |
+
vertical-align: top; /* Aligns with st.button */
|
| 846 |
+
margin-top: -5px; /* Adjust alignment with st.button */
|
| 847 |
}
|
| 848 |
+
|
| 849 |
+
/* Tooltip text */
|
| 850 |
+
.tooltip-container .tooltiptext {
|
| 851 |
visibility: hidden;
|
| 852 |
+
max-width: 250px; /* Tooltip width */
|
| 853 |
background-color: #f9f9f9;
|
| 854 |
color: #333;
|
| 855 |
text-align: left;
|
| 856 |
border-radius: 8px;
|
| 857 |
padding: 10px;
|
| 858 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 859 |
position: absolute;
|
| 860 |
z-index: 1;
|
| 861 |
+
bottom: 120%; /* Position above the button */
|
| 862 |
left: 50%;
|
| 863 |
transform: translateX(-50%);
|
| 864 |
opacity: 0;
|
| 865 |
transition: opacity 0.3s;
|
| 866 |
}
|
| 867 |
+
|
| 868 |
+
/* Show tooltip on hover */
|
| 869 |
+
.tooltip-container:hover .tooltiptext {
|
| 870 |
visibility: visible;
|
| 871 |
opacity: 1;
|
| 872 |
}
|
| 873 |
+
|
| 874 |
+
/* "LetAI Allocate" Button */
|
| 875 |
+
.tooltip-container button {
|
| 876 |
+
background-color: rgb(82, 129, 134);
|
| 877 |
+
color: white;
|
| 878 |
border: none;
|
| 879 |
+
padding: 8px 16px;
|
| 880 |
+
font-size: 14px;
|
| 881 |
+
border-radius: 5px;
|
|
|
|
| 882 |
cursor: pointer;
|
| 883 |
+
box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
|
| 884 |
+
font-family: Arial, sans-serif;
|
| 885 |
}
|
| 886 |
+
|
| 887 |
+
.tooltip-container button:hover {
|
| 888 |
+
background-color: rgb(70, 115, 119);
|
| 889 |
}
|
| 890 |
</style>
|
| 891 |
"""
|
| 892 |
+
|
| 893 |
+
# Inject the CSS
|
| 894 |
st.markdown(tooltip_css, unsafe_allow_html=True)
|
|
|
|
|
|
|
| 895 |
tooltip_html = """
|
| 896 |
+
<div class="tooltip-container">
|
| 897 |
+
<button>LetAI Allocate</button>
|
| 898 |
<span class="tooltiptext">
|
| 899 |
<b>Let AI help you allocate the TrustBuilder®:</b><br><br>
|
| 900 |
1. AI will analyze the TrustBuilder® text.<br>
|
|
|
|
| 904 |
</div>
|
| 905 |
"""
|
| 906 |
st.markdown(tooltip_html, unsafe_allow_html=True)
|
| 907 |
+
|
| 908 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 909 |
|
| 910 |
|
| 911 |
|