Simon Riezebos commited on
Commit
4422bca
·
1 Parent(s): 4470c81

Fix incosnsitent index path

Browse files
Files changed (1) hide show
  1. app/src/hf_utils.py +4 -4
app/src/hf_utils.py CHANGED
@@ -14,15 +14,15 @@ def get_hf_api():
14
  def get_geojson_index_df():
15
  hf_api = get_hf_api()
16
  try:
17
- csv_path = hf_api.hf_hub_download(
18
  repo_id="rodekruis/flood-mapping",
19
- filename="index.csv",
20
  repo_type="dataset",
21
  force_download=True,
22
  )
23
- return pd.read_csv(csv_path)
24
  except Exception as e:
25
- st.warning(f"No index.csv found on Hugging Face: {e}")
26
  return pd.DataFrame(columns=["aoi_id", "datetime", "product", "path_in_repo"])
27
 
28
 
 
14
  def get_geojson_index_df():
15
  hf_api = get_hf_api()
16
  try:
17
+ index_path = hf_api.hf_hub_download(
18
  repo_id="rodekruis/flood-mapping",
19
+ filename="index.parquet",
20
  repo_type="dataset",
21
  force_download=True,
22
  )
23
+ return pd.read_parquet(index_path)
24
  except Exception as e:
25
+ st.warning(f"No index.parquet found on Hugging Face: {e}")
26
  return pd.DataFrame(columns=["aoi_id", "datetime", "product", "path_in_repo"])
27
 
28