Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -123,6 +123,17 @@ search_query = collections[selected]
|
|
123 |
# Define the collection URL
|
124 |
collection_url = f"https://www.loc.gov/search/?q={search_query}&fo=json"
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
# Create an empty placeholder for Quick Stats
|
127 |
stats_placeholder = st.sidebar.empty()
|
128 |
|
|
|
123 |
# Define the collection URL
|
124 |
collection_url = f"https://www.loc.gov/search/?q={search_query}&fo=json"
|
125 |
|
126 |
+
# π Field Completeness Breakdown (green-styled, placed above links)
|
127 |
+
st.sidebar.markdown("### π Field Completeness Breakdown", unsafe_allow_html=True)
|
128 |
+
|
129 |
+
try:
|
130 |
+
styled_table = completeness_table.style.background_gradient(cmap="Greens").format("{:.1f}%")
|
131 |
+
st.sidebar.dataframe(styled_table, use_container_width=True, height=200)
|
132 |
+
except Exception as e:
|
133 |
+
st.sidebar.warning("Could not style completeness table.")
|
134 |
+
st.sidebar.dataframe(completeness_table)
|
135 |
+
|
136 |
+
|
137 |
# Create an empty placeholder for Quick Stats
|
138 |
stats_placeholder = st.sidebar.empty()
|
139 |
|