Spaces:
Runtime error
Runtime error
Fix the way to create the dataset
Browse files- functions.py +1 -1
functions.py
CHANGED
@@ -58,7 +58,7 @@ def build_faiss_index(text):
|
|
58 |
for item in text_list:
|
59 |
emb_list.append({"embeddings": get_embeddings(item)})
|
60 |
# dataset = DatasetDict({'train': emb_list})
|
61 |
-
dataset = Dataset.
|
62 |
dataset.add_faiss_index(column="embeddings")
|
63 |
shared['embeddings_dataset'] = dataset
|
64 |
print(['build_faiss_index', 'end'])
|
|
|
58 |
for item in text_list:
|
59 |
emb_list.append({"embeddings": get_embeddings(item)})
|
60 |
# dataset = DatasetDict({'train': emb_list})
|
61 |
+
dataset = Dataset.from_list(emb_list)
|
62 |
dataset.add_faiss_index(column="embeddings")
|
63 |
shared['embeddings_dataset'] = dataset
|
64 |
print(['build_faiss_index', 'end'])
|