Spaces:
Running
Running
resolved env issues in utils
Browse files- __pycache__/utils.cpython-313.pyc +0 -0
- utils.py +3 -0
__pycache__/utils.cpython-313.pyc
CHANGED
|
Binary files a/__pycache__/utils.cpython-313.pyc and b/__pycache__/utils.cpython-313.pyc differ
|
|
|
utils.py
CHANGED
|
@@ -5,6 +5,9 @@ import openai
|
|
| 5 |
import requests
|
| 6 |
from anthropic import Anthropic
|
| 7 |
from requests.exceptions import RequestException
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Initialize clients
|
| 10 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|
|
|
|
| 5 |
import requests
|
| 6 |
from anthropic import Anthropic
|
| 7 |
from requests.exceptions import RequestException
|
| 8 |
+
from dotenv import load_dotenv
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
load_dotenv(dotenv_path=Path(__file__).resolve().parent / ".env")
|
| 11 |
|
| 12 |
# Initialize clients
|
| 13 |
openai.api_key = os.getenv("OPENAI_API_KEY")
|