[text] L

Viewer

  1. def main():
  2.     # Page title
  3.     st.title("TCS Data Harmonization Platform")
  4.  
  5.     # CSS to set background color
  6.     st.markdown(
  7.         """
  8.         <style>
  9.         body {
  10.             background-color: #FFC0CB;
  11.         }
  12.         </style>
  13.         """,
  14.         unsafe_allow_html=True
  15.     )
  16.  
  17.     # Welcome message with person logo
  18.     st.text("Welcome - User")
  19.     st.image("person_logo.png", width=30)
  20.  
  21.     # Harmonization data with screenshots
  22.     harmonization_data = [
  23.         {"Type": "Competitor Harmonization", "Screenshot": "competitor_screenshot.png"},
  24.         {"Type": "Product Harmonization", "Screenshot": "product_screenshot.png"},
  25.         {"Type": "Market/Format Harmonization", "Screenshot": "market_format_screenshot.png"},
  26.         {"Type": "Time Period Harmonization", "Screenshot": "time_period_screenshot.png"}
  27.     ]
  28.  
  29.     # Convert to DataFrame
  30.     df = pd.DataFrame(harmonization_data)
  31.  
  32.     # Display harmonization types with screenshots in a 2x2 grid layout
  33.     st.write("<div style='display: flex;'>", unsafe_allow_html=True)
  34.     for index, row in df.iterrows():
  35.         st.write(
  36.             f"<div style='flex: 1; padding: 10px;'>"
  37.             f"<h3>{row['Type']}</h3>"
  38.             f"<img src='{row['Screenshot']}' style='width: 100%;'>"
  39.             f"</div>",
  40.             unsafe_allow_html=True
  41.         )
  42.         if (index + 1) % 2 == 0:
  43.             st.write("</div><div style='display: flex;'>", unsafe_allow_html=True)
  44.     st.write("</div>", unsafe_allow_html=True)
  45.  
  46.     # Footer
  47.     st.markdown("---")
  48.     st.markdown("Cognitive and Integrated Insights platform powered by AI/ML that drives Digital Transformation and External Data Harmonization")
  49.  
  50. if __name__ == "__main__":
  51.     # Set layout to wide for title alignment
  52.     st.set_page_config(layout="wide")
  53.  
  54.     # Call main function
  55.     main()

Editor

You can edit this paste and save as new:


File Description
  • L
  • Paste Code
  • 24 Apr-2024
  • 1.83 Kb
You can Share it: