CCockrum commited on
Commit
43bb364
Β·
verified Β·
1 Parent(s): 367a3e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -75,6 +75,7 @@ st.markdown("""
75
  border: 1px solid #ccc;
76
 
77
  }
 
78
  </style>
79
  """, unsafe_allow_html=True)
80
 
@@ -115,6 +116,22 @@ search_query = collections[selected]
115
  # Define the collection URL
116
  collection_url = f"https://www.loc.gov/search/?q={search_query}&fo=json"
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
  # Helpful Resources (styled and moved below dropdown)
120
  st.sidebar.markdown("### Helpful Resources", unsafe_allow_html=True)
@@ -206,7 +223,7 @@ if fetch_data:
206
 
207
  # Show summary statistics in sidebar
208
  if not metadata_df.empty:
209
- st.sidebar.markdown("### πŸ“Š Quick Stats")
210
  st.sidebar.write(f"Total Records: {len(metadata_df)}")
211
  st.sidebar.write(f"Incomplete Records: {len(metadata_df[metadata_df.isnull().any(axis=1)])}")
212
 
 
75
  border: 1px solid #ccc;
76
 
77
  }
78
+
79
  </style>
80
  """, unsafe_allow_html=True)
81
 
 
116
  # Define the collection URL
117
  collection_url = f"https://www.loc.gov/search/?q={search_query}&fo=json"
118
 
119
+ # πŸ“Š Quick Stats Section (styled)
120
+ st.sidebar.markdown("""
121
+ <style>
122
+ .sidebar-stats h3 {
123
+ color: lightgray !important;
124
+ font-size: 1.1rem !important;
125
+ margin-top: 1.5rem;
126
+ }
127
+ </style>
128
+ <h3 class="sidebar-stats">Quick Stats</h3>
129
+ """, unsafe_allow_html=True)
130
+
131
+ if not metadata_df.empty:
132
+ st.sidebar.write(f"Total Records: {len(metadata_df)}")
133
+ st.sidebar.write(f"Incomplete Records: {len(metadata_df[metadata_df.isnull().any(axis=1)])}")
134
+
135
 
136
  # Helpful Resources (styled and moved below dropdown)
137
  st.sidebar.markdown("### Helpful Resources", unsafe_allow_html=True)
 
223
 
224
  # Show summary statistics in sidebar
225
  if not metadata_df.empty:
226
+ st.sidebar.markdown("<h3 class='sidebar-stats'>Quick Stats</h3>", unsafe_allow_html=True)
227
  st.sidebar.write(f"Total Records: {len(metadata_df)}")
228
  st.sidebar.write(f"Incomplete Records: {len(metadata_df[metadata_df.isnull().any(axis=1)])}")
229