Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,8 @@ from sentence_transformers.util import cos_sim
|
|
3 |
import numpy as np
|
4 |
|
5 |
def textToFloatVector(text):
|
6 |
-
|
|
|
7 |
vec = x.astype(np.float)
|
8 |
return vec
|
9 |
|
|
|
3 |
import numpy as np
|
4 |
|
5 |
def textToFloatVector(text):
|
6 |
+
preprocessed = text.replace('[', '').replace(']','');
|
7 |
+
x = np.fromstring(preprocessed, dtype=float, sep=',')
|
8 |
vec = x.astype(np.float)
|
9 |
return vec
|
10 |
|