Spaces:
Build error
Build error
Update app.py
Browse files775 unmodified lines77677777877977978078178212 unmodified lines79579679779879879980080114 unmodified lines81681781881982082181982082182282311 unmodified lines835836837839840841842843844845846847848849850838851852853854839840841775 unmodified lines "Competence", ] # Icon filenames (ensure these icons are in the same directory as your script) # Map bucket names to icon filenames icon_files = { "Stability": "Bucket_STABILITY.png", "Development": "Bucket_DEVELOPMENT.png",12 unmodified lines st.error(f"File not found: {file_path}") return "" # Generate HTML for the dropdown # Generate HTML for dropdown dropdown_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) if bucket in icon_files: icon_path = os.path.join(".", icon_files[bucket]) # Adjust path if icons are in a subdirectory 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 subdirectory encoded_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®")app.py+5-21