Files changed (1) hide show
  1. visual2.py +6 -6
visual2.py CHANGED
@@ -300,20 +300,20 @@ def _(mo):
300
  def _(Path, mo):
301
  # ===== Input/output paths for Hugging Face Spaces =====
302
  # Primary location requested for local runs in this environment.
303
- DATA_FILENAME = "data_species_merged.xlsx"
304
  default_candidates = [
305
- Path("/mnt/data") / DATA_FILENAME,
306
- Path.cwd() / DATA_FILENAME, # typical Hugging Face Space layout
307
  Path(__file__).resolve().parent / DATA_FILENAME,
308
  ]
309
 
310
  # Automatically use the first existing dataset path. If none exists, keep
311
- # /mnt/data/data_species_merged.xlsx as the displayed default so the error
312
  # message clearly shows the expected file location.
313
  default_file = next((p for p in default_candidates if p.exists()), default_candidates[0])
314
 
315
  # Write generated figures to a local outputs folder. This works both in
316
- # /mnt/data and in Hugging Face Spaces.
317
  output_dir = Path("outputs")
318
  output_dir.mkdir(exist_ok=True)
319
  default_stem = output_dir / "coffee_sites_visualisation_marimo"
@@ -341,7 +341,7 @@ def _(Path, mo):
341
  mo.md(
342
  '<div class="coffee-sites-notebook"><div class="card" style="padding: 1rem 1.1rem;">'
343
  '<div class="section-title">Inputs</div>'
344
- '<div class="helper">The notebook automatically looks for <code>data_species_merged.xlsx</code> in <code>/mnt/data</code>, the current working directory, and the app folder. For Hugging Face Spaces, place the Excel file next to this Python file or keep the shown path if you mount data there.</div>'
345
  '</div></div>'
346
  ),
347
  data_path,
 
300
  def _(Path, mo):
301
  # ===== Input/output paths for Hugging Face Spaces =====
302
  # Primary location requested for local runs in this environment.
303
+ DATA_FILENAME = "merged_species_dataset.xlsx"
304
  default_candidates = [
305
+ Path("data") / DATA_FILENAME,
306
+ Path.cwd() / DATA_FILENAME,
307
  Path(__file__).resolve().parent / DATA_FILENAME,
308
  ]
309
 
310
  # Automatically use the first existing dataset path. If none exists, keep
311
+ # data/data_species_merged.xlsx as the displayed default so the error
312
  # message clearly shows the expected file location.
313
  default_file = next((p for p in default_candidates if p.exists()), default_candidates[0])
314
 
315
  # Write generated figures to a local outputs folder. This works both in
316
+ # /data and in Hugging Face Spaces.
317
  output_dir = Path("outputs")
318
  output_dir.mkdir(exist_ok=True)
319
  default_stem = output_dir / "coffee_sites_visualisation_marimo"
 
341
  mo.md(
342
  '<div class="coffee-sites-notebook"><div class="card" style="padding: 1rem 1.1rem;">'
343
  '<div class="section-title">Inputs</div>'
344
+ '<div class="helper">The notebook automatically looks for <code>data_species_merged.xlsx</code> in <code>data</code>, the current working directory, and the app folder. For Hugging Face Spaces, place the Excel file next to this Python file or keep the shown path if you mount data there.</div>'
345
  '</div></div>'
346
  ),
347
  data_path,