Spaces:
Sleeping
Sleeping
Update get_cv.py
Browse files
get_cv.py
CHANGED
@@ -15,7 +15,7 @@ def get_embedding(text, model="text-embedding-ada-002"):
|
|
15 |
text = text.replace("\n", " ")
|
16 |
except:
|
17 |
None
|
18 |
-
return openai.
|
19 |
|
20 |
def get_embedding2(text, model="text-embedding-ada-002"):
|
21 |
try:
|
|
|
15 |
text = text.replace("\n", " ")
|
16 |
except:
|
17 |
None
|
18 |
+
return openai.embeddings.create(input = [text], model=model).data[0].embedding
|
19 |
|
20 |
def get_embedding2(text, model="text-embedding-ada-002"):
|
21 |
try:
|