mtoft20 commited on
Commit
e093d35
Β·
verified Β·
1 Parent(s): d364883

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +7 -3
src/streamlit_app.py CHANGED
@@ -345,7 +345,11 @@ def main():
345
 
346
  with col1:
347
  # Content listings
348
- st.subheader(f"πŸ“‹ Found {len(st.session_state.filtered_content)} Titles")
 
 
 
 
349
 
350
  if st.session_state.filtered_content:
351
  # Show first 10 items
@@ -370,8 +374,8 @@ def main():
370
  st.write(f"**πŸ“– Description:**")
371
  st.write(content.get('description', 'N/A'))
372
 
373
- if len(st.session_state.filtered_content) > 10:
374
- st.info(f"Showing first 10 of {len(st.session_state.filtered_content)} titles. Adjust filters to narrow results.")
375
  else:
376
  st.info("No content matches your current filters. Try adjusting the criteria.")
377
 
 
345
 
346
  with col1:
347
  # Content listings
348
+ filtered_count = len(st.session_state.filtered_content)
349
+ if filtered_count == 0:
350
+ st.subheader("πŸ“‹ No Titles Found")
351
+ else:
352
+ st.subheader(f"πŸ“‹ Found {filtered_count:,} Title{'s' if filtered_count != 1 else ''}")
353
 
354
  if st.session_state.filtered_content:
355
  # Show first 10 items
 
374
  st.write(f"**πŸ“– Description:**")
375
  st.write(content.get('description', 'N/A'))
376
 
377
+ if filtered_count > 10:
378
+ st.info(f"Showing first 10 of {filtered_count:,} titles. Adjust filters to narrow results.")
379
  else:
380
  st.info("No content matches your current filters. Try adjusting the criteria.")
381