Spaces:
Sleeping
Sleeping
pratikshahp
commited on
Update guardrail.py
Browse files- guardrail.py +6 -2
guardrail.py
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
from together import Together
|
2 |
-
from
|
|
|
3 |
|
|
|
|
|
|
|
4 |
# Initialize Together client
|
5 |
-
client = Together(api_key=
|
6 |
|
7 |
# Set the safety content policy
|
8 |
safe_content_policy = {
|
|
|
1 |
from together import Together
|
2 |
+
from dotenv import load_dotenv
|
3 |
+
import os
|
4 |
|
5 |
+
# Load environment variables
|
6 |
+
load_dotenv()
|
7 |
+
api_key = os.getenv("API_KEY")
|
8 |
# Initialize Together client
|
9 |
+
client = Together(api_key=api_key)
|
10 |
|
11 |
# Set the safety content policy
|
12 |
safe_content_policy = {
|