destinyebuka commited on
Commit
c1c44f0
·
1 Parent(s): 442f776
Files changed (1) hide show
  1. app/ai/services/vision_service.py +2 -2
app/ai/services/vision_service.py CHANGED
@@ -24,8 +24,8 @@ class VisionService:
24
  def __init__(self):
25
  self.hf_token = settings.HF_TOKEN or settings.HUGGINGFACE_API_KEY
26
  self.model_id = settings.HF_VISION_MODEL
27
- # Use standard HuggingFace Inference API endpoint
28
- self.api_url = f"https://api-inference.huggingface.co/models/{self.model_id}"
29
  self.headers = {
30
  "Authorization": f"Bearer {self.hf_token}",
31
  "Content-Type": "application/json"
 
24
  def __init__(self):
25
  self.hf_token = settings.HF_TOKEN or settings.HUGGINGFACE_API_KEY
26
  self.model_id = settings.HF_VISION_MODEL
27
+ # HuggingFace now requires router.huggingface.co (api-inference deprecated Jan 2026)
28
+ self.api_url = f"https://router.huggingface.co/hf-inference/models/{self.model_id}"
29
  self.headers = {
30
  "Authorization": f"Bearer {self.hf_token}",
31
  "Content-Type": "application/json"