added PyInstaller builds, AGPLv3, transport config
- Add pyinstaller.spec and GitHub/Forgejo CI workflows for cross-platform builds - Add AGPLv3 license - Move data storage to ~/.tinyweb/ - Add --version and --port CLI flags - Add transport node selection in /style (smart regeneration preserves Reticulum config) - Add discover more nodes link to rmap.world
This commit is contained in:
parent
e6f77f0a55
commit
5b32d69863
9 changed files with 924 additions and 20 deletions
|
|
@ -5,10 +5,11 @@ import re
|
|||
import threading
|
||||
import numpy as np
|
||||
|
||||
DATA_DIR = os.path.expanduser("~/.tinyweb")
|
||||
MODEL_ID = "Snowflake/snowflake-arctic-embed-s"
|
||||
MODEL_DIR = os.path.join(os.path.dirname(__file__), "models", "snowflake-arctic-embed-s")
|
||||
RERANKER_DIR = os.path.join(os.path.dirname(__file__), "models", "cross-encoder")
|
||||
HNSW_PATH = os.path.join(os.path.dirname(__file__), "index.hnsw")
|
||||
MODEL_DIR = os.path.join(DATA_DIR, "models", "snowflake-arctic-embed-s")
|
||||
RERANKER_DIR = os.path.join(DATA_DIR, "models", "cross-encoder")
|
||||
HNSW_PATH = os.path.join(DATA_DIR, "index.hnsw")
|
||||
DIMS = 384
|
||||
MAX_TOKENS = 512
|
||||
QUERY_PREFIX = "Represent this sentence for searching relevant passages: "
|
||||
|
|
@ -33,6 +34,7 @@ _hnsw_lock = threading.Lock()
|
|||
|
||||
def _ensure_model():
|
||||
"""Download the ONNX model and tokenizer from HuggingFace if not present."""
|
||||
os.makedirs(MODEL_DIR, exist_ok=True)
|
||||
model_path = os.path.join(MODEL_DIR, "model.onnx")
|
||||
tokenizer_path = os.path.join(MODEL_DIR, "tokenizer.json")
|
||||
if os.path.exists(model_path) and os.path.exists(tokenizer_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue