ppsingh commited on
Commit
868541f
·
verified ·
1 Parent(s): 659f3df

Update auditqa/reader.py

Browse files
Files changed (1) hide show
  1. auditqa/reader.py +3 -3
auditqa/reader.py CHANGED
@@ -10,6 +10,7 @@ load_dotenv()
10
  model_config = getconfig("model_params.cfg")
11
  NVIDIA_SERVER = os.environ["NVIDIA_SERVERLESS"]
12
  HF_token = os.environ["LLAMA_3_1"]
 
13
 
14
 
15
  def nvidia_client():
@@ -24,15 +25,14 @@ def nvidia_client():
24
 
25
  def serverless_api():
26
  try:
27
- HF_token = os.environ["LLAMA_3_1"]
28
- if not HF_token:
29
  raise ValueError("LLAMA_3_1 environment variable is empty")
30
 
31
  model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
32
 
33
  client = InferenceClient(
34
  model=model_id,
35
- api_key=HF_token,
36
  )
37
 
38
  return client
 
10
  model_config = getconfig("model_params.cfg")
11
  NVIDIA_SERVER = os.environ["NVIDIA_SERVERLESS"]
12
  HF_token = os.environ["LLAMA_3_1"]
13
+ INF_SERVERLESS = os.environ["INF_SERVERLESS"]
14
 
15
 
16
  def nvidia_client():
 
25
 
26
  def serverless_api():
27
  try:
28
+ if not INF_SERVERLESS:
 
29
  raise ValueError("LLAMA_3_1 environment variable is empty")
30
 
31
  model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
32
 
33
  client = InferenceClient(
34
  model=model_id,
35
+ api_key=INF_SERVERLESS,
36
  )
37
 
38
  return client