Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ openai_key = ""
|
|
29 |
# Check if the toggle is on
|
30 |
if api_toggle:
|
31 |
# If the toggle is on, access the API key from secrets
|
32 |
-
openai_key = os.
|
33 |
openai.api_key = openai_key
|
34 |
else:
|
35 |
# If the toggle is off, allow the user to input the API key
|
|
|
29 |
# Check if the toggle is on
|
30 |
if api_toggle:
|
31 |
# If the toggle is on, access the API key from secrets
|
32 |
+
openai_key = os.getenv("OPENAI_API_KEY")
|
33 |
openai.api_key = openai_key
|
34 |
else:
|
35 |
# If the toggle is off, allow the user to input the API key
|