devve1 commited on
Commit
71a78f4
1 Parent(s): 13ac213

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -292,8 +292,8 @@ def load_models_and_documents():
292
 
293
  sparse_matrices = []
294
  for embedding in sparse_embeddings:
295
- data = embedding.values
296
- indices = embedding.indices
297
  indptr = np.array([0, len(data)])
298
  matrix = csr_matrix((data, indices, indptr), shape=(1, max_index + 1))
299
  sparse_matrices.append(matrix)
 
292
 
293
  sparse_matrices = []
294
  for embedding in sparse_embeddings:
295
+ data = np.array(embedding.values)
296
+ indices = np.array(embedding.indices)
297
  indptr = np.array([0, len(data)])
298
  matrix = csr_matrix((data, indices, indptr), shape=(1, max_index + 1))
299
  sparse_matrices.append(matrix)