Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ print(f"Example embedding shape: {np.array(example_embedding).shape}")
|
|
21 |
|
22 |
# Ensure embeddings are 2-dimensional and of type string
|
23 |
def ensure_2d_embeddings(embeddings):
|
24 |
-
embeddings = np.array(embeddings, dtype=np.
|
25 |
if embeddings.ndim == 1:
|
26 |
embeddings = embeddings.reshape(1, -1)
|
27 |
return embeddings
|
|
|
21 |
|
22 |
# Ensure embeddings are 2-dimensional and of type string
|
23 |
def ensure_2d_embeddings(embeddings):
|
24 |
+
embeddings = np.array(embeddings, dtype=np.float8)
|
25 |
if embeddings.ndim == 1:
|
26 |
embeddings = embeddings.reshape(1, -1)
|
27 |
return embeddings
|