Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -263,7 +263,7 @@ def _save_faiss(fx_dir: str, xb: np.ndarray, meta: Dict[str, Any]) -> None:
|
|
| 263 |
|
| 264 |
# entraînement sur un sous‑échantillon (max 10 k vecteurs)
|
| 265 |
rng = np.random.default_rng(0)
|
| 266 |
-
train = xb[rng.choice(xb.shape[0], min(10_000, xb.shape[0]), replace=False]
|
| 267 |
index.train(train)
|
| 268 |
|
| 269 |
index.add(xb)
|
|
|
|
| 263 |
|
| 264 |
# entraînement sur un sous‑échantillon (max 10 k vecteurs)
|
| 265 |
rng = np.random.default_rng(0)
|
| 266 |
+
train = xb[rng.choice(xb.shape[0], min(10_000, xb.shape[0]), replace=False)]
|
| 267 |
index.train(train)
|
| 268 |
|
| 269 |
index.add(xb)
|