diff --git a/api.py b/api.py index b00414c..8ab99d1 100644 --- a/api.py +++ b/api.py @@ -12,6 +12,8 @@ indices_of_nearest_neighbors_from_distances, ) +from flask_cors import CORS + #model EMBEDDING_MODEL = "text-embedding-3-small" @@ -92,6 +94,8 @@ def print_recommendations_from_strings( app = Flask(__name__) +CORS(app) + @app.route('/search', methods=['GET']) def knn_search(): try: