Update app.py
Browse files
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,
|