markeff commited on
Commit
e7c0cb6
·
verified ·
1 Parent(s): 4565c00

Update example.py

Browse files
Files changed (1) hide show
  1. example.py +1 -1
example.py CHANGED
@@ -5,7 +5,7 @@ import openai
5
  app = Flask(__name__)
6
 
7
  # Configure OpenAI API Key (replace with your own)
8
- openai.api_key = "OPEN_API_KEY"
9
 
10
  def init_db():
11
  with sqlite3.connect("recipes.db") as conn:
 
5
  app = Flask(__name__)
6
 
7
  # Configure OpenAI API Key (replace with your own)
8
+ openai.api_key = os.getenv("OPENAI_API_KEY") # Uses Hugging Face secret
9
 
10
  def init_db():
11
  with sqlite3.connect("recipes.db") as conn: