Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ A **production-inspired multi-microservice semantic search system** built over 2
|
|
| 15 |
Designed with:
|
| 16 |
- **Sentence-Transformers** (`all-MiniLM-L6-v2`)
|
| 17 |
- **Local Embedding Cache**
|
| 18 |
-
- **FAISS
|
| 19 |
- **LLM-Driven Explanations** (Gemini 2.5 Flash)
|
| 20 |
- **Google-Gemini-Style Streamlit UI**
|
| 21 |
- **Microservice Architecture**
|
|
@@ -107,9 +107,22 @@ You can call:
|
|
| 107 |
POST /embed_batch
|
| 108 |
POST /embed_document
|
| 109 |
|
| 110 |
-
|
| 111 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
## Design Choices
|
| 115 |
|
|
|
|
| 15 |
Designed with:
|
| 16 |
- **Sentence-Transformers** (`all-MiniLM-L6-v2`)
|
| 17 |
- **Local Embedding Cache**
|
| 18 |
+
- **FAISS vector search + persistent storage**
|
| 19 |
- **LLM-Driven Explanations** (Gemini 2.5 Flash)
|
| 20 |
- **Google-Gemini-Style Streamlit UI**
|
| 21 |
- **Microservice Architecture**
|
|
|
|
| 107 |
POST /embed_batch
|
| 108 |
POST /embed_document
|
| 109 |
|
|
|
|
| 110 |
---
|
| 111 |
+
### π§© FAISS Persistence (Warm Start Optimization)
|
| 112 |
+
|
| 113 |
+
The system stores embeddings **and** the FAISS vector index on disk:
|
| 114 |
+
|
| 115 |
+
- `cache/embeddings.npy` β all stored embeddings
|
| 116 |
+
- `cache/embed_meta.json` β filename β hash β embedding index
|
| 117 |
+
- `faiss_index.bin` β saved FAISS index
|
| 118 |
+
- `faiss_meta.pkl` β mapping of FAISS row β document filename
|
| 119 |
|
| 120 |
+
On startup, the `search_service` automatically runs:
|
| 121 |
+
|
| 122 |
+
```python
|
| 123 |
+
indexer.try_load()
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
|
| 127 |
## Design Choices
|
| 128 |
|