Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,9 @@ import numpy as np
|
|
| 4 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 5 |
import openai
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
def find_closest_neighbors(vector1, dictionary_of_vectors):
|
| 8 |
"""
|
| 9 |
Takes a vector and a dictionary of vectors and returns the three closest neighbors
|
|
|
|
| 4 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 5 |
import openai
|
| 6 |
|
| 7 |
+
openai.api_key = os.environ["Secret"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
def find_closest_neighbors(vector1, dictionary_of_vectors):
|
| 11 |
"""
|
| 12 |
Takes a vector and a dictionary of vectors and returns the three closest neighbors
|