Spaces:
Build error
Build error
Use 41m embeddings
Browse files
app.py
CHANGED
|
@@ -9,11 +9,11 @@ import faiss
|
|
| 9 |
from usearch.index import Index
|
| 10 |
|
| 11 |
# Load titles and texts
|
| 12 |
-
title_text_dataset = load_dataset("mixedbread-ai/wikipedia-
|
| 13 |
|
| 14 |
# Load the int8 and binary indices. Int8 is loaded as a view to save memory, as we never actually perform search with it.
|
| 15 |
-
int8_view = Index.restore("
|
| 16 |
-
binary_index: faiss.IndexBinaryFlat = faiss.read_index_binary("
|
| 17 |
|
| 18 |
# Load the SentenceTransformer model for embedding the queries
|
| 19 |
model = SentenceTransformer(
|
|
|
|
| 9 |
from usearch.index import Index
|
| 10 |
|
| 11 |
# Load titles and texts
|
| 12 |
+
title_text_dataset = load_dataset("mixedbread-ai/wikipedia-embed-en-2023-11", split="train").select_columns(["title", "text"])
|
| 13 |
|
| 14 |
# Load the int8 and binary indices. Int8 is loaded as a view to save memory, as we never actually perform search with it.
|
| 15 |
+
int8_view = Index.restore("wikipedia_int8_usearch_50m.index", view=True)
|
| 16 |
+
binary_index: faiss.IndexBinaryFlat = faiss.read_index_binary("wikipedia_ubinary_faiss_50m.index")
|
| 17 |
|
| 18 |
# Load the SentenceTransformer model for embedding the queries
|
| 19 |
model = SentenceTransformer(
|