fix: noms PlantNet en français (lang=fr) + sauvegarde image systématique sans plante liée

This commit is contained in:
2026-02-22 13:11:34 +01:00
parent 7361958fe2
commit 326158f680
2 changed files with 12 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ async def identify(image_bytes: bytes, filename: str = "photo.jpg") -> List[dict
async with httpx.AsyncClient(timeout=10.0) as client:
resp = await client.post(
PLANTNET_URL,
params={"api-key": PLANTNET_KEY, "nb-results": 3},
params={"api-key": PLANTNET_KEY, "nb-results": 3, "lang": "fr"},
files={"images": (filename, image_bytes, "image/jpeg")},
data={"organs": ["auto"]},
)