Skip to content

Commit

Permalink
Add CORS capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjustin committed Oct 22, 2024
1 parent e6d9fd3 commit 89f9eb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
from flask import Flask, request, jsonify
from flask_cors import CORS
import os
from openai import OpenAI

app = Flask(__name__)

# Enable CORS for all routes
CORS(app)

# Initialize OpenAI client
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
flask
flask_cors
openai

0 comments on commit 89f9eb1

Please sign in to comment.