milyiyo commited on
Commit
6382446
·
1 Parent(s): 0f5a30d

Fix the way to create the dataset

Browse files
Files changed (1) hide show
  1. 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.from_dict(emb_list)
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'])