Spaces:
Running
Running
Commit
·
c1c44f0
1
Parent(s):
442f776
fyp
Browse files
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 |
-
#
|
| 28 |
-
self.api_url = f"https://
|
| 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"
|