From f40e52b8c8a8665189fd41248f91bfc0d8a14f59 Mon Sep 17 00:00:00 2001 From: Julien Salinas Date: Tue, 12 Mar 2024 11:48:54 +0100 Subject: [PATCH] Decomission the lib versions api endpoint. --- README.md | 10 ---------- nlpcloud/__init__.py | 14 -------------- 2 files changed, 24 deletions(-) diff --git a/README.md b/README.md index 8aeae16..98b025d 100644 --- a/README.md +++ b/README.md @@ -287,16 +287,6 @@ client.langdetection("") The above command returns a JSON object. -### Library Versions Endpoint - -Call the `lib_versions()` method to know the versions of the libraries used behind the hood with the model (for example the PyTorch, TensorFlow, or spaCy version used). - -```python -client.lib_versions() -``` - -The above command returns a JSON object. - ### Paraphrasing Endpoint Call the `paraphrasing()` method and pass the text you want to paraphrase. diff --git a/nlpcloud/__init__.py b/nlpcloud/__init__.py index 2a7d82d..c782e72 100644 --- a/nlpcloud/__init__.py +++ b/nlpcloud/__init__.py @@ -303,20 +303,6 @@ def langdetection(self, text): return r.json() - def lib_versions(self): - r = requests.get( - "{}/{}".format(self.root_url, "versions"), headers=self.headers) - - try: - r.raise_for_status() - except HTTPError as err: - if "" in r.text: - raise HTTPError(str(err)) - - raise HTTPError(str(err) + ": " + str(r.text)) - - return r.json() - def paraphrasing(self, text): payload = { "text": text