Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,12 +27,13 @@ index = None
|
|
| 27 |
#from dotenv import load_dotenv, find_dotenv
|
| 28 |
#_ = load_dotenv(find_dotenv()) # read local .env file
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
-
|
|
|
|
| 33 |
|
| 34 |
# Replace "OPENAI_API_KEY" with the actual name of your secret
|
| 35 |
-
api_key = secrets.get("OPENAI_API_KEY")
|
| 36 |
|
| 37 |
if api_key:
|
| 38 |
resp = validate(api_key)
|
|
|
|
| 27 |
#from dotenv import load_dotenv, find_dotenv
|
| 28 |
#_ = load_dotenv(find_dotenv()) # read local .env file
|
| 29 |
|
| 30 |
+
api_key = os.environ['OPENAI_API_KEY']
|
| 31 |
|
| 32 |
+
|
| 33 |
+
#from huggingface_hub import secrets
|
| 34 |
|
| 35 |
# Replace "OPENAI_API_KEY" with the actual name of your secret
|
| 36 |
+
#api_key = secrets.get("OPENAI_API_KEY")
|
| 37 |
|
| 38 |
if api_key:
|
| 39 |
resp = validate(api_key)
|