richiam commited on
Commit
955ae4d
·
verified ·
1 Parent(s): e7233d4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1758,8 +1758,15 @@ def _load_cluster_csv(model, min_val, threshold):
1758
  f"t={threshold}_ALL_FIELDS")
1759
  for ext in (".csv.gz", ".csv"):
1760
  path = base + ext
1761
- if os.path.isfile(path):
 
 
1762
  return pd.read_csv(path, compression="gzip" if ext == ".csv.gz" else None)
 
 
 
 
 
1763
  return None
1764
 
1765
 
 
1758
  f"t={threshold}_ALL_FIELDS")
1759
  for ext in (".csv.gz", ".csv"):
1760
  path = base + ext
1761
+ if not os.path.isfile(path):
1762
+ continue
1763
+ try:
1764
  return pd.read_csv(path, compression="gzip" if ext == ".csv.gz" else None)
1765
+ except Exception:
1766
+ try:
1767
+ return pd.read_csv(path) # fallback: file may be plain CSV despite .gz extension
1768
+ except Exception:
1769
+ continue
1770
  return None
1771
 
1772