Yoxas commited on
Commit
d782baa
·
verified ·
1 Parent(s): b9fdcdb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -27,10 +27,11 @@ print(embeddings_array.shape)
27
  if len(embeddings_array.shape) == 1:
28
  embeddings_array = embeddings_array.reshape(-1, 1)
29
 
30
- # Replace the list with the numpy array
31
- data["Abstract_Embeddings"] = embeddings_array
 
32
 
33
- data = data.add_faiss_index("Abstract_Embeddings")
34
 
35
 
36
  model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
 
27
  if len(embeddings_array.shape) == 1:
28
  embeddings_array = embeddings_array.reshape(-1, 1)
29
 
30
+ # Create a new Dataset with the modified data
31
+ new_data = data.remove_column("Abstract_Embeddings")
32
+ new_data = new_data.add_column("Abstract_Embeddings", embeddings_array)
33
 
34
+ new_data = new_data.add_faiss_index("Abstract_Embeddings")
35
 
36
 
37
  model_id = "meta-llama/Meta-Llama-3-8B-Instruct"