Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -776,7 +776,7 @@ def side():
|
|
| 776 |
"Competence",
|
| 777 |
]
|
| 778 |
|
| 779 |
-
#
|
| 780 |
icon_files = {
|
| 781 |
"Stability": "Bucket_STABILITY.png",
|
| 782 |
"Development": "Bucket_DEVELOPMENT.png",
|
|
@@ -795,7 +795,7 @@ def side():
|
|
| 795 |
st.error(f"File not found: {file_path}")
|
| 796 |
return ""
|
| 797 |
|
| 798 |
-
# Generate HTML for
|
| 799 |
dropdown_html = """
|
| 800 |
<style>
|
| 801 |
.custom-dropdown {
|
|
@@ -816,9 +816,8 @@ def side():
|
|
| 816 |
"""
|
| 817 |
|
| 818 |
for bucket in trust_buckets:
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
icon_path = os.path.join(".", icon_path)
|
| 822 |
encoded_img = get_base64(icon_path)
|
| 823 |
dropdown_html += f"""
|
| 824 |
<option style="background-image: url('data:image/png;base64,{encoded_img}');
|
|
@@ -836,22 +835,7 @@ def side():
|
|
| 836 |
</select>
|
| 837 |
</div>
|
| 838 |
"""
|
| 839 |
-
|
| 840 |
-
icon_path = os.path.join(".", bucket["icon"]) # Adjust the path if your icons are in a subdirectory
|
| 841 |
-
encoded_img = get_base64(icon_path)
|
| 842 |
-
dropdown_html += f"""
|
| 843 |
-
<option style="background-image: url('data:image/png;base64,{encoded_img}');
|
| 844 |
-
background-repeat: no-repeat;
|
| 845 |
-
background-position: left center;
|
| 846 |
-
padding-left: 40px;">
|
| 847 |
-
{bucket['label']}
|
| 848 |
-
</option>
|
| 849 |
-
"""
|
| 850 |
-
|
| 851 |
-
dropdown_html += """
|
| 852 |
-
</select>
|
| 853 |
-
</div>
|
| 854 |
-
"""
|
| 855 |
|
| 856 |
|
| 857 |
st.subheader("Show My TrustBuilders®")
|
|
|
|
| 776 |
"Competence",
|
| 777 |
]
|
| 778 |
|
| 779 |
+
# Map bucket names to icon filenames
|
| 780 |
icon_files = {
|
| 781 |
"Stability": "Bucket_STABILITY.png",
|
| 782 |
"Development": "Bucket_DEVELOPMENT.png",
|
|
|
|
| 795 |
st.error(f"File not found: {file_path}")
|
| 796 |
return ""
|
| 797 |
|
| 798 |
+
# Generate HTML for dropdown
|
| 799 |
dropdown_html = """
|
| 800 |
<style>
|
| 801 |
.custom-dropdown {
|
|
|
|
| 816 |
"""
|
| 817 |
|
| 818 |
for bucket in trust_buckets:
|
| 819 |
+
if bucket in icon_files:
|
| 820 |
+
icon_path = os.path.join(".", icon_files[bucket]) # Adjust path if icons are in a subdirectory
|
|
|
|
| 821 |
encoded_img = get_base64(icon_path)
|
| 822 |
dropdown_html += f"""
|
| 823 |
<option style="background-image: url('data:image/png;base64,{encoded_img}');
|
|
|
|
| 835 |
</select>
|
| 836 |
</div>
|
| 837 |
"""
|
| 838 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 839 |
|
| 840 |
|
| 841 |
st.subheader("Show My TrustBuilders®")
|