Spaces:
Sleeping
Sleeping
Commit
·
42972b8
1
Parent(s):
46c25c8
made api key safe
Browse files- .gitignore +1 -0
- routes/tex_based_review.py +2 -1
.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
api_tokens
|
|
|
|
|
|
| 1 |
api_tokens
|
| 2 |
+
.env
|
routes/tex_based_review.py
CHANGED
|
@@ -7,7 +7,8 @@ import re
|
|
| 7 |
def review_chess_game(pgn_file_path):
|
| 8 |
# Load environment variables and initialize Groq client
|
| 9 |
load_dotenv()
|
| 10 |
-
API_KEY = "
|
|
|
|
| 11 |
if not API_KEY:
|
| 12 |
raise ValueError("API key not found. Please set GROQ_API_KEY in the .env file.")
|
| 13 |
client = Groq(api_key=API_KEY)
|
|
|
|
| 7 |
def review_chess_game(pgn_file_path):
|
| 8 |
# Load environment variables and initialize Groq client
|
| 9 |
load_dotenv()
|
| 10 |
+
API_KEY = os.getenv("GROQ_API_KEY")
|
| 11 |
+
|
| 12 |
if not API_KEY:
|
| 13 |
raise ValueError("API key not found. Please set GROQ_API_KEY in the .env file.")
|
| 14 |
client = Groq(api_key=API_KEY)
|