Skip to content

Commit

Permalink
Decomission the lib versions api endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliensalinas committed Mar 12, 2024
1 parent 78f0909 commit f40e52b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,6 @@ client.langdetection("<The text you want to analyze>")

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.
Expand Down
14 changes: 0 additions & 14 deletions nlpcloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<!DOCTYPE html>" in r.text:
raise HTTPError(str(err))

raise HTTPError(str(err) + ": " + str(r.text))

return r.json()

def paraphrasing(self, text):
payload = {
"text": text
Expand Down

0 comments on commit f40e52b

Please sign in to comment.