Yoxas commited on
Commit
11d5743
·
verified ·
1 Parent(s): 87489a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,8 @@ embeddings_array = np.array(data["Abstract_Embeddings"])
24
  print(embeddings_array.shape)
25
 
26
  new_data = data.remove_columns("Abstract_Embeddings")
27
- embeddings_array = np.array(data["Abstract_Embeddings"], dtype=np.float32)
 
28
  if len(embeddings_array.shape) == 1:
29
  embeddings_array = embeddings_array.reshape(-1, 1)
30
  embeddings_array = np.ascontiguousarray(embeddings_array)
 
24
  print(embeddings_array.shape)
25
 
26
  new_data = data.remove_columns("Abstract_Embeddings")
27
+ embeddings_array = [np.fromstring(embedding.replace('[', '').replace(']', '').replace('\n', ''), sep=' ') for embedding in data["Abstract_Embeddings"]]
28
+ embeddings_array = np.array(embeddings_array, dtype=np.float32)
29
  if len(embeddings_array.shape) == 1:
30
  embeddings_array = embeddings_array.reshape(-1, 1)
31
  embeddings_array = np.ascontiguousarray(embeddings_array)