P-Karthik-Mohan commited on
Commit
fe5c216
·
verified ·
1 Parent(s): 44bbd21

fixed hardcoded api key :)

Browse files

I am just typing this bcz i am free rn, This hardcoded API key was in old version of inference.py , recently I removed it and maintained in .env , but when I push this to HF space, the file was'nt updating, same old line of exposed API key.. so took the matter into own hands and reached HF space to directly edit code here, hope it changes this time :)"

Files changed (1) hide show
  1. inference.py +1 -1
inference.py CHANGED
@@ -19,7 +19,7 @@ HF_TOKEN = os.environ.get("HF_TOKEN","")
19
  client = OpenAI(
20
  base_url=API_BASE_URL,
21
 
22
- api_key="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",
23
  )
24
 
25
  def env_reset(task_id: int) -> dict:
 
19
  client = OpenAI(
20
  base_url=API_BASE_URL,
21
 
22
+ api_key=HF_TOKEN if HF_TOKEN else "no-key-needed",
23
  )
24
 
25
  def env_reset(task_id: int) -> dict: