Skip to content

Commit

Permalink
fix cors
Browse files Browse the repository at this point in the history
  • Loading branch information
MSiorr committed Sep 29, 2024
1 parent a715222 commit d436b5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
indices_of_nearest_neighbors_from_distances,
)

from flask_cors import CORS

#model
EMBEDDING_MODEL = "text-embedding-3-small"

Expand Down Expand Up @@ -92,6 +94,8 @@ def print_recommendations_from_strings(

app = Flask(__name__)

CORS(app)

@app.route('/search', methods=['GET'])
def knn_search():
try:
Expand Down

0 comments on commit d436b5f

Please sign in to comment.