Spaces:
Sleeping
Sleeping
Update generator.py
Browse files- generator.py +1 -1
generator.py
CHANGED
@@ -3,7 +3,7 @@ import time
|
|
3 |
import os
|
4 |
|
5 |
# Set your OpenAI API key
|
6 |
-
|
7 |
# Check if the API key is set correctly
|
8 |
if openai_api_key is None:
|
9 |
print("API key is not set!")
|
|
|
3 |
import os
|
4 |
|
5 |
# Set your OpenAI API key
|
6 |
+
openai_api_key = os.getenv("OPENAI_API_KEY")
|
7 |
# Check if the API key is set correctly
|
8 |
if openai_api_key is None:
|
9 |
print("API key is not set!")
|