Spaces:
Runtime error
Runtime error
Update example.py
Browse files- 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 = "
|
| 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:
|