Public Access
Contournement de la panne DNS Hugging Face via le nouveau routeur
Build and Push Docker Image / build-and-push (push) Successful in 37s
Build and Push Docker Image / build-and-push (push) Successful in 37s
This commit is contained in:
1 parent
073c779109
commit
909a4efb11
2 files changed
+2
-2
No files matched your search
@@ -11,7 +11,7 @@ def interroger_huggingface(prompt: str, modele_cible="mistralai/Mistral-7B-Instr
|
||||
if not api_key:
|
||||
raise Exception("Clé API HuggingFace manquante dans le .env")
|
||||
|
||||
url = f"https://api-inference.huggingface.co/models/{modele_cible}"
|
||||
url = f"https://router.huggingface.co/hf-inference/models/{modele_cible}"
|
||||
headers = {
|
||||
"Authorization": f"Bearer {api_key}",
|
||||
"Content-Type": "application/json"
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ def generer_image_huggingface(prompt: str) -> tuple:
|
||||
api_key = os.getenv("HUGGINGFACE_API_KEY")
|
||||
if not api_key: return None, "Clé API manquante"
|
||||
|
||||
url = "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0"
|
||||
url = "https://router.huggingface.co/hf-inference/models/stabilityai/stable-diffusion-xl-base-1.0"
|
||||
headers = {"Authorization": f"Bearer {api_key}"}
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user