Herc commited on
Commit
96f5c11
·
verified ·
1 Parent(s): f13f642

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -22
app.py CHANGED
@@ -114,33 +114,15 @@ st.markdown("""
114
  </style>
115
  """, unsafe_allow_html=True)
116
 
117
- # Custom CSS for a green checkbox
118
  st.markdown("""
119
  <style>
120
- .green-checkbox {
121
- display: inline-block;
122
  color: green;
123
- margin: 0 4px 0 0;
124
- font-size: 20px;
125
- font-weight: bold;
126
- }
127
- .attribute-label {
128
- display: inline;
129
- font-size: 16px;
130
  }
131
  </style>
132
  """, unsafe_allow_html=True)
133
 
134
- # Function to display a green checkbox for "True" attributes
135
- def display_attribute(label, is_true):
136
- if is_true:
137
- st.markdown(f'<span class="green-checkbox">&#x2714;</span><span class="attribute-label">{label}</span>', unsafe_allow_html=True)
138
- else:
139
- st.markdown(f'<span class="attribute-label">{label}</span>', unsafe_allow_html=True)
140
 
141
- # Example usage within the app
142
- display_attribute("Cyber Approved", True) # This will display a green checkbox
143
- display_attribute("Accessibility Approved", False) # This will display just the label without a checkbox
144
 
145
 
146
  # Streamlit app layout
@@ -175,11 +157,12 @@ for index, row in filtered_catalog.iterrows():
175
  st.markdown(f"""
176
  <div>
177
  <p><b>Category:</b> {row['Category']}</p>
178
- <p><b>Cyber Approved:</b> {'Yes' if row['Cyber Approved'] else 'No'}</p>
179
- <p><b>Accessibility Approved:</b> {'Yes' if row['Accessibility Approved'] else 'No'}</p>
180
- <p><b>Privacy Approved:</b> {'Yes' if row['Privacy Approved'] else 'No'}</p>
181
  <p><b>Review Date:</b> {row['Review Date']}</p>
182
  <p><b>Review Status:</b> {row['Review Status']}</p>
183
  {'<p><b>Not Approved Reason:</b> '+row['Not Approved Reason']+'</p>' if row['Review Status'] == 'Not Approved' else ''}
184
  </div>
185
  """, unsafe_allow_html=True)
 
 
114
  </style>
115
  """, unsafe_allow_html=True)
116
 
 
117
  st.markdown("""
118
  <style>
119
+ .status-true {
 
120
  color: green;
 
 
 
 
 
 
 
121
  }
122
  </style>
123
  """, unsafe_allow_html=True)
124
 
 
 
 
 
 
 
125
 
 
 
 
126
 
127
 
128
  # Streamlit app layout
 
157
  st.markdown(f"""
158
  <div>
159
  <p><b>Category:</b> {row['Category']}</p>
160
+ <p><b>Cyber Approved:</b> <span class='{"status-true" if row["Cyber Approved"] else ""}'>{'Yes' if row['Cyber Approved'] else 'No'}</span></p>
161
+ <p><b>Accessibility Approved:</b> <span class='{"status-true" if row["Accessibility Approved"] else ""}'>{'Yes' if row['Accessibility Approved'] else 'No'}</span></p>
162
+ <p><b>Privacy Approved:</b> <span class='{"status-true" if row["Privacy Approved"] else ""}'>{'Yes' if row['Privacy Approved'] else 'No'}</span></p>
163
  <p><b>Review Date:</b> {row['Review Date']}</p>
164
  <p><b>Review Status:</b> {row['Review Status']}</p>
165
  {'<p><b>Not Approved Reason:</b> '+row['Not Approved Reason']+'</p>' if row['Review Status'] == 'Not Approved' else ''}
166
  </div>
167
  """, unsafe_allow_html=True)
168
+