rufimelo commited on
Commit
db97132
Β·
verified Β·
1 Parent(s): 36d1aae

Fix LOGS_DIR resolution for HF Space

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -14,7 +14,11 @@ from pathlib import Path
14
 
15
  import streamlit as st
16
 
17
- LOGS_DIR = Path(__file__).parent.parent / "logs" / "github_red"
 
 
 
 
18
 
19
  # ── Colours & labels ────────────────────────────────────────────────────────
20
 
 
14
 
15
  import streamlit as st
16
 
17
+ # Local: scripts/trajectory_viewer.py β†’ repo_root/logs/github_red
18
+ # Space: /app/app.py β†’ /app/logs/github_red
19
+ _local_logs = Path(__file__).parent.parent / "logs" / "github_red"
20
+ _space_logs = Path(__file__).parent / "logs" / "github_red"
21
+ LOGS_DIR = _space_logs if _space_logs.exists() else _local_logs
22
 
23
  # ── Colours & labels ────────────────────────────────────────────────────────
24