4 Commits

Author SHA1 Message Date
dierk 3d375161bd Change Search button label to Suchen
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 12:14:57 +02:00
dierk 7f08813635 Switch frontend search chips and placeholder to German
Matches the German search words shown on the demo slide in the presentation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 12:12:10 +02:00
dierk 978c70e91a Add HuggingFace URL note to CLIP slide
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 12:07:11 +02:00
dierk 4a82352391 Document CLIP model source in embedder.py and README
Model downloads automatically from HuggingFace Hub on first use.
No manual download required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 12:04:10 +02:00
8 changed files with 49 additions and 30 deletions
+9
View File
@@ -439,6 +439,15 @@ pip3 install -r pgvector-demo/backend/requirements.txt --break-system-packages
pip3 install -r oravector-demo/backend/requirements.txt --break-system-packages pip3 install -r oravector-demo/backend/requirements.txt --break-system-packages
``` ```
**CLIP model** — not included in the repository. It is downloaded automatically from
Hugging Face Hub on first use (~600 MB, cached in `~/.cache/huggingface/hub/`):
> `sentence-transformers/clip-ViT-B-32`
> https://huggingface.co/sentence-transformers/clip-ViT-B-32
No manual download is required — `sentence-transformers` handles this transparently
when `index_images.py` or a backend is started for the first time.
### 1. PostgreSQL ### 1. PostgreSQL
**Start the container:** **Start the container:**
Binary file not shown.
+4
View File
@@ -592,6 +592,10 @@ txb(s, "Bild-Vektor und Text-Vektor zeigen in dieselbe Richtung,\nwenn Bild und
Inches(0.8), Inches(5.0), Inches(11.5), Inches(1.0), Inches(0.8), Inches(5.0), Inches(11.5), Inches(1.0),
size=18, italic=True, color=ACCENT_IDB) size=18, italic=True, color=ACCENT_IDB)
txb(s, "🔗 huggingface.co/sentence-transformers/clip-ViT-B-32 — wird beim ersten Start automatisch heruntergeladen (~600 MB)",
Inches(0.8), Inches(6.55), Inches(12.0), Inches(0.35),
size=11, color=DIM_CLR, italic=True)
# ════════════════════════════════════════════════════════════════════════════ # ════════════════════════════════════════════════════════════════════════════
# Slide 6 — Cosinus-Distanz # Slide 6 — Cosinus-Distanz
# ════════════════════════════════════════════════════════════════════════════ # ════════════════════════════════════════════════════════════════════════════
+3
View File
@@ -6,6 +6,9 @@ _model = None
def _get_model(): def _get_model():
# Lazy load: the CLIP model is ~600 MB and takes several seconds to initialise. # Lazy load: the CLIP model is ~600 MB and takes several seconds to initialise.
# Loading on first call avoids the cost at import time and during indexing warmup. # Loading on first call avoids the cost at import time and during indexing warmup.
# Downloaded automatically from Hugging Face Hub on first use:
# https://huggingface.co/sentence-transformers/clip-ViT-B-32
# Cached in ~/.cache/huggingface/hub/
global _model global _model
if _model is None: if _model is None:
_model = SentenceTransformer("clip-ViT-B-32") _model = SentenceTransformer("clip-ViT-B-32")
+10 -10
View File
@@ -147,18 +147,18 @@
<div class="search-area"> <div class="search-area">
<div class="search-row"> <div class="search-row">
<input id="query" type="text" placeholder="Search photos, e.g. trees, water, night…" /> <input id="query" type="text" placeholder="Fotos suchen, z.B. Bäume, Wasser, Nacht…" />
<button class="search-btn" onclick="doSearch()">Search</button> <button class="search-btn" onclick="doSearch()">Suchen</button>
</div> </div>
<div class="chips"> <div class="chips">
<span class="chip" onclick="setQuery('trees')">trees</span> <span class="chip" onclick="setQuery('Bäume')">Bäume</span>
<span class="chip" onclick="setQuery('water')">water</span> <span class="chip" onclick="setQuery('Wasser')">Wasser</span>
<span class="chip" onclick="setQuery('people')">people</span> <span class="chip" onclick="setQuery('Menschen')">Menschen</span>
<span class="chip" onclick="setQuery('buildings')">buildings</span> <span class="chip" onclick="setQuery('Gebäude')">Gebäude</span>
<span class="chip" onclick="setQuery('sky')">sky</span> <span class="chip" onclick="setQuery('Himmel')">Himmel</span>
<span class="chip" onclick="setQuery('street')">street</span> <span class="chip" onclick="setQuery('Straße')">Straße</span>
<span class="chip" onclick="setQuery('night')">night</span> <span class="chip" onclick="setQuery('Nacht')">Nacht</span>
<span class="chip" onclick="setQuery('cars')">cars</span> <span class="chip" onclick="setQuery('Autos')">Autos</span>
</div> </div>
</div> </div>
+10 -10
View File
@@ -147,18 +147,18 @@
<div class="search-area"> <div class="search-area">
<div class="search-row"> <div class="search-row">
<input id="query" type="text" placeholder="Search photos, e.g. trees, water, night…" /> <input id="query" type="text" placeholder="Fotos suchen, z.B. Bäume, Wasser, Nacht…" />
<button class="search-btn" onclick="doSearch()">Search</button> <button class="search-btn" onclick="doSearch()">Suchen</button>
</div> </div>
<div class="chips"> <div class="chips">
<span class="chip" onclick="setQuery('trees')">trees</span> <span class="chip" onclick="setQuery('Bäume')">Bäume</span>
<span class="chip" onclick="setQuery('water')">water</span> <span class="chip" onclick="setQuery('Wasser')">Wasser</span>
<span class="chip" onclick="setQuery('people')">people</span> <span class="chip" onclick="setQuery('Menschen')">Menschen</span>
<span class="chip" onclick="setQuery('buildings')">buildings</span> <span class="chip" onclick="setQuery('Gebäude')">Gebäude</span>
<span class="chip" onclick="setQuery('sky')">sky</span> <span class="chip" onclick="setQuery('Himmel')">Himmel</span>
<span class="chip" onclick="setQuery('street')">street</span> <span class="chip" onclick="setQuery('Straße')">Straße</span>
<span class="chip" onclick="setQuery('night')">night</span> <span class="chip" onclick="setQuery('Nacht')">Nacht</span>
<span class="chip" onclick="setQuery('cars')">cars</span> <span class="chip" onclick="setQuery('Autos')">Autos</span>
</div> </div>
</div> </div>
+3
View File
@@ -6,6 +6,9 @@ _model = None
def _get_model(): def _get_model():
# Lazy load: the CLIP model is ~600 MB and takes several seconds to initialise. # Lazy load: the CLIP model is ~600 MB and takes several seconds to initialise.
# Loading on first call avoids the cost at import time and during indexing warmup. # Loading on first call avoids the cost at import time and during indexing warmup.
# Downloaded automatically from Hugging Face Hub on first use:
# https://huggingface.co/sentence-transformers/clip-ViT-B-32
# Cached in ~/.cache/huggingface/hub/
global _model global _model
if _model is None: if _model is None:
_model = SentenceTransformer("clip-ViT-B-32") _model = SentenceTransformer("clip-ViT-B-32")
+10 -10
View File
@@ -147,18 +147,18 @@
<div class="search-area"> <div class="search-area">
<div class="search-row"> <div class="search-row">
<input id="query" type="text" placeholder="Search photos, e.g. trees, water, night…" /> <input id="query" type="text" placeholder="Fotos suchen, z.B. Bäume, Wasser, Nacht…" />
<button class="search-btn" onclick="doSearch()">Search</button> <button class="search-btn" onclick="doSearch()">Suchen</button>
</div> </div>
<div class="chips"> <div class="chips">
<span class="chip" onclick="setQuery('trees')">trees</span> <span class="chip" onclick="setQuery('Bäume')">Bäume</span>
<span class="chip" onclick="setQuery('water')">water</span> <span class="chip" onclick="setQuery('Wasser')">Wasser</span>
<span class="chip" onclick="setQuery('people')">people</span> <span class="chip" onclick="setQuery('Menschen')">Menschen</span>
<span class="chip" onclick="setQuery('buildings')">buildings</span> <span class="chip" onclick="setQuery('Gebäude')">Gebäude</span>
<span class="chip" onclick="setQuery('sky')">sky</span> <span class="chip" onclick="setQuery('Himmel')">Himmel</span>
<span class="chip" onclick="setQuery('street')">street</span> <span class="chip" onclick="setQuery('Straße')">Straße</span>
<span class="chip" onclick="setQuery('night')">night</span> <span class="chip" onclick="setQuery('Nacht')">Nacht</span>
<span class="chip" onclick="setQuery('cars')">cars</span> <span class="chip" onclick="setQuery('Autos')">Autos</span>
</div> </div>
</div> </div>