File size: 1,151 Bytes
a521353
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Path detection — HF Spaces /data bucket vs local ./local_data clone."""
import os
from pathlib import Path


def _detect() -> Path:
    p = Path("/data")
    if p.exists() and os.access(p, os.W_OK):
        return p
    local = Path(__file__).resolve().parent.parent / "local_data"
    local.mkdir(exist_ok=True)
    return local


DATA_PATH       = _detect()
HYPERGRAPH_DB   = DATA_PATH / "hypergraph" / "civilization.db"
FOSSILS_DIR     = DATA_PATH / "fossils"
AUDIO_CACHE     = DATA_PATH / "audio_cache"
NODE_POSITIONS  = DATA_PATH / "node_positions"
REMINDERS_DB    = DATA_PATH / "reminders.db"
CALENDAR_ICS    = DATA_PATH / "calendar.ics"
OUTBOX          = DATA_PATH / "outbox"

for d in (HYPERGRAPH_DB.parent, FOSSILS_DIR, AUDIO_CACHE, NODE_POSITIONS, OUTBOX):
    d.mkdir(parents=True, exist_ok=True)

MODEL_REPO   = os.environ.get("ELYSIUM_MODEL_REPO",   "build-small-hackathon/elysium-GGUF")
GGUF_FILE    = os.environ.get("ELYSIUM_GGUF_FILE",    "elysium-Q6_K.gguf")
MMPROJ_FILE  = os.environ.get("ELYSIUM_MMPROJ_FILE",  "mmproj-model-f16.gguf")
OFFLINE_MODE = os.environ.get("ELYSIUM_OFFLINE", "0") == "1"