annikwag commited on
Commit
c258cbb
·
verified ·
1 Parent(s): ce2ec6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  import pandas as pd
3
- from appStore.prep_data import process_giz_worldwide, remove_duplicates, get_max_end_year
4
  from appStore.prep_utils import create_documents, get_client
5
  from appStore.embed import hybrid_embed_chunks
6
  from appStore.search import hybrid_search
@@ -314,8 +314,8 @@ else:
314
  matched_countries.append(resolved_name)
315
 
316
  # Format the year range
317
- start_year_str = f"{int(round(float(start_year)))}" if start_year else "Unknown"
318
- end_year_str = f"{int(round(float(end_year_)))}" if end_year_ else "Unknown"
319
 
320
  # Build the final string
321
  if matched_countries:
 
1
  import streamlit as st
2
  import pandas as pd
3
+ from appStore.prep_data import process_giz_worldwide, remove_duplicates, get_max_end_year, extract_year
4
  from appStore.prep_utils import create_documents, get_client
5
  from appStore.embed import hybrid_embed_chunks
6
  from appStore.search import hybrid_search
 
314
  matched_countries.append(resolved_name)
315
 
316
  # Format the year range
317
+ start_year_str = extract_year(start_year) if start_year else "Unknown"
318
+ end_year_str = extract_year(end_year) if end_year else "Unknown"
319
 
320
  # Build the final string
321
  if matched_countries: