Wajahat698 commited on
Commit
ee7dd71
·
verified ·
1 Parent(s): 3a68f30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -25
app.py CHANGED
@@ -824,31 +824,31 @@ def side():
824
  st.markdown("</div>", unsafe_allow_html=True)
825
 
826
  # Save TrustBuilders Section
827
- st.subheader("Save TrustBuilders®")
828
- brand = st.text_input("Brand/Product/Person", key="brand_input_save")
829
- trust_builder_text = st.text_area("Type/paste Trust Builder®", height=100)
830
-
831
- if trust_builder_text.strip():
832
- st.write("Choose the Trust Bucket® by clicking on an image to save:")
833
- st.markdown('<div class="image-container">', unsafe_allow_html=True)
834
- for bucket, img_path in image_files:
835
- try:
836
- # Display clickable image for saving
837
- if st.button(label="", key=f"save_{bucket}", help=f"Save to {bucket}"):
838
- save_trustbuilder(user_id, trust_builder_text.strip(), bucket)
839
- st.markdown(
840
- f"""
841
- <div class="image-wrapper">
842
- <img src="{img_path}" alt="{bucket}" title="{bucket}">
843
- </div>
844
- """,
845
- unsafe_allow_html=True,
846
- )
847
- except FileNotFoundError:
848
- st.warning(f"Image not found: {img_path}")
849
- st.markdown("</div>", unsafe_allow_html=True)
850
- else:
851
- st.warning("Please enter a Trust Builder text to save.")
852
 
853
 
854
 
 
824
  st.markdown("</div>", unsafe_allow_html=True)
825
 
826
  # Save TrustBuilders Section
827
+ st.subheader("Save TrustBuilders®")
828
+ brand = st.text_input("Brand/Product/Person", key="brand_input_save")
829
+ trust_builder_text = st.text_area("Type/paste Trust Builder®", height=100)
830
+
831
+ if trust_builder_text.strip():
832
+ st.write("Choose the Trust Bucket® by clicking on an image to save:")
833
+ st.markdown('<div class="image-container">', unsafe_allow_html=True)
834
+ for bucket, img_path in image_files:
835
+ try:
836
+ # Display clickable image for saving
837
+ if st.button(label="", key=f"save_{bucket}", help=f"Save to {bucket}"):
838
+ save_trustbuilder(user_id, trust_builder_text.strip(), bucket)
839
+ st.markdown(
840
+ f"""
841
+ <div class="image-wrapper">
842
+ <img src="{img_path}" alt="{bucket}" title="{bucket}">
843
+ </div>
844
+ """,
845
+ unsafe_allow_html=True,
846
+ )
847
+ except FileNotFoundError:
848
+ st.warning(f"Image not found: {img_path}")
849
+ st.markdown("</div>", unsafe_allow_html=True)
850
+ else:
851
+ st.warning("Please enter a Trust Builder text to save.")
852
 
853
 
854