From 757cab9f104f2b5ff54cd44ad901b68779c4c20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Bournhonesque?= Date: Thu, 18 Apr 2024 11:10:52 +0200 Subject: [PATCH] fix: make predict_lang compatible with signature --- openfoodfacts/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfoodfacts/api.py b/openfoodfacts/api.py index b7d538c..766d20d 100644 --- a/openfoodfacts/api.py +++ b/openfoodfacts/api.py @@ -78,7 +78,7 @@ def predict_lang(self, text: str, k: int = 10, threshold: float = 0.01) -> JSONT return http_session.post( url=f"{self.base_url}/api/v1/predict/lang", data={"text": text, "k": k, "threshold": threshold}, - ) + ).json() class FacetResource: