mgbam commited on
Commit
26dcc45
·
verified ·
1 Parent(s): 538d9b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -232,6 +232,8 @@ def get_inference_client(model_id):
232
  bill_to="huggingface" # Assuming billing through HF for Groq
233
  )
234
  elif provider == "huggingface":
 
 
235
  return InferenceClient(
236
  provider="auto", # Use HF's auto provider for other HF models
237
  api_key=HF_TOKEN,
 
232
  bill_to="huggingface" # Assuming billing through HF for Groq
233
  )
234
  elif provider == "huggingface":
235
+ if not HF_TOKEN:
236
+ raise ValueError("HF_TOKEN environment variable not set for Hugging Face models.")
237
  return InferenceClient(
238
  provider="auto", # Use HF's auto provider for other HF models
239
  api_key=HF_TOKEN,