disabled semantic search by default
This commit is contained in:
parent
5b32d69863
commit
a1320ed4e4
3 changed files with 18 additions and 5 deletions
15
README.md
15
README.md
|
|
@ -22,7 +22,20 @@ Download the latest release for your platform from the [GitHub Releases](https:/
|
||||||
| macOS | `TinyWeb-macos-arm64` |
|
| macOS | `TinyWeb-macos-arm64` |
|
||||||
| Linux | `TinyWeb-linux-x64` |
|
| Linux | `TinyWeb-linux-x64` |
|
||||||
|
|
||||||
Run the downloaded file — no installation required. Your data is stored in `~/.tinyweb/`.
|
Run the downloaded file — no installation required.
|
||||||
|
|
||||||
|
## Data storage
|
||||||
|
|
||||||
|
Your data is stored in `~/.tinyweb/`:
|
||||||
|
|
||||||
|
| File | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| `index.db` | SQLite database with your indexed pages |
|
||||||
|
| `tinyweb_identity` | Your Reticulum identity (keep safe!) |
|
||||||
|
| `models/` | Downloaded AI models for semantic search |
|
||||||
|
| `index.hnsw` | Semantic search index |
|
||||||
|
|
||||||
|
This allows your data to persist between upgrades and stay separate from the application.
|
||||||
|
|
||||||
### Command line options
|
### Command line options
|
||||||
|
|
||||||
|
|
|
||||||
4
app.py
4
app.py
|
|
@ -139,14 +139,14 @@ def ensure_rns_config(config_dir, transport_host=None, transport_port=None):
|
||||||
|
|
||||||
def _preload_embeddings():
|
def _preload_embeddings():
|
||||||
"""Pre-load the embedding model and build the HNSW index in background."""
|
"""Pre-load the embedding model and build the HNSW index in background."""
|
||||||
if get_setting("semantic_search", "1") != "1":
|
if get_setting("semantic_search", "0") != "1":
|
||||||
print("Semantic search disabled.")
|
print("Semantic search disabled.")
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
from embeddings import _get_session, _get_reranker, build_index
|
from embeddings import _get_session, _get_reranker, build_index
|
||||||
_get_session()
|
_get_session()
|
||||||
build_index()
|
build_index()
|
||||||
if get_setting("use_reranker", "1") == "1":
|
if get_setting("use_reranker", "0") == "1":
|
||||||
_get_reranker()
|
_get_reranker()
|
||||||
print("Semantic search ready (with reranker).")
|
print("Semantic search ready (with reranker).")
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -678,9 +678,9 @@ def handle_style_form(msg=""):
|
||||||
name = get_site_name()
|
name = get_site_name()
|
||||||
sharing = get_setting("sharing_enabled", "0")
|
sharing = get_setting("sharing_enabled", "0")
|
||||||
checked = " checked" if sharing == "1" else ""
|
checked = " checked" if sharing == "1" else ""
|
||||||
semantic = get_setting("semantic_search", "1")
|
semantic = get_setting("semantic_search", "0")
|
||||||
semantic_checked = " checked" if semantic == "1" else ""
|
semantic_checked = " checked" if semantic == "1" else ""
|
||||||
reranker = get_setting("use_reranker", "1")
|
reranker = get_setting("use_reranker", "0")
|
||||||
reranker_checked = " checked" if reranker == "1" else ""
|
reranker_checked = " checked" if reranker == "1" else ""
|
||||||
disabled = "" if semantic == "1" else " disabled"
|
disabled = "" if semantic == "1" else " disabled"
|
||||||
dimmed = ' style="opacity:0.4"' if semantic != "1" else ""
|
dimmed = ' style="opacity:0.4"' if semantic != "1" else ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue