Narendra9009 commited on
Commit
42972b8
·
1 Parent(s): 46c25c8

made api key safe

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. 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 = "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"
 
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)