Spaces:
Build error
Build error
Update app.py
Browse files775 unmodified lines77677777877978078178212 unmodified lines79579679779879980080114 unmodified lines81681781881982082182282382411 unmodified lines836837838839840841842843844845846847848849850851852853854855856857775 unmodified lines"Competence",]# Icon filenames (ensure these icons are in the same directory as your script)icon_files = {"Stability": "Bucket_STABILITY.png","Development": "Bucket_DEVELOPMENT.png",12 unmodified linesst.error(f"File not found: {file_path}")return ""# Generate HTML for the dropdowndropdown_html = """<style>.custom-dropdown {14 unmodified lines"""for bucket in trust_buckets:icon_path = icon_files.get(bucket, "")if icon_path:icon_path = os.path.join(".", icon_path)encoded_img = get_base64(icon_path)dropdown_html += f"""<option style="background-image: url('data:image/png;base64,{encoded_img}');11 unmodified lines</select></div>"""for bucket in trust_buckets:icon_path = os.path.join(".", bucket["icon"]) # Adjust the path if your icons are in a subdirectoryencoded_img = get_base64(icon_path)dropdown_html += f"""<option style="background-image: url('data:image/png;base64,{encoded_img}');background-repeat: no-repeat;background-position: left center;padding-left: 40px;">{bucket['label']}</option>"""dropdown_html += """</select></div>"""st.subheader("Show My TrustBuilders®")775 unmodified lines77677777877978078178212 unmodified lines79579679779879980080114 unmodified lines81681781881982082182282311 unmodified lines835836837838839840841775 unmodified lines"Competence",]# Map bucket names to icon filenamesicon_files = {"Stability": "Bucket_STABILITY.png","Development": "Bucket_DEVELOPMENT.png",12 unmodified linesst.error(f"File not found: {file_path}")return ""# Generate HTML for dropdowndropdown_html = """<style>.custom-dropdown {14 unmodified lines"""for bucket in trust_buckets:if bucket in icon_files:icon_path = os.path.join(".", icon_files[bucket]) # Adjust path if icons are in a subdirectoryencoded_img = get_base64(icon_path)dropdown_html += f"""<option style="background-image: url('data:image/png;base64,{encoded_img}');11 unmodified lines</select></div>"""st.subheader("Show My TrustBuilders®")
app.py+5-21