Spaces:
Runtime error
Runtime error
DiamondYin
commited on
Commit
•
d6ff146
1
Parent(s):
274670c
Update app_utils.py
Browse files- app_utils.py +1 -1
app_utils.py
CHANGED
@@ -27,7 +27,7 @@ from tenacity import (
|
|
27 |
@retry(wait=wait_random_exponential(min=1, max=60), stop=stop_after_attempt(6))
|
28 |
@st.cache_data
|
29 |
def embedding_from_string(input: str, model: str) -> list:
|
30 |
-
response =
|
31 |
embedding = response["data"][0]["embedding"]
|
32 |
return embedding
|
33 |
|
|
|
27 |
@retry(wait=wait_random_exponential(min=1, max=60), stop=stop_after_attempt(6))
|
28 |
@st.cache_data
|
29 |
def embedding_from_string(input: str, model: str) -> list:
|
30 |
+
response = OpenAI.Embedding.create(input=input, model=model)
|
31 |
embedding = response["data"][0]["embedding"]
|
32 |
return embedding
|
33 |
|