Update app.py
Browse files
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)
|