Skip to content

Commit a981464

Browse files
hanouticelinagithub-actions[bot]
authored andcommitted
Update API inference documentation (automated)
1 parent aeb7f4b commit a981464

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

changed_files.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
docs/api-inference/tasks/image-segmentation.md
2+
docs/api-inference/tasks/zero-shot-classification.md
3+
scripts/api-inference/package.json
4+
scripts/api-inference/pnpm-lock.yaml

docs/api-inference/tasks/image-segmentation.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ For more details about the `image-segmentation` task, check out its [dedicated p
2424

2525
### Recommended models
2626

27-
- [openmmlab/upernet-convnext-small](https://huggingface.co/openmmlab/upernet-convnext-small): Solid semantic segmentation model trained on ADE20k.
2827
- [facebook/mask2former-swin-large-coco-panoptic](https://huggingface.co/facebook/mask2former-swin-large-coco-panoptic): Panoptic segmentation model trained on the COCO (common objects) dataset.
2928

3029
Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=image-segmentation&sort=trending).
@@ -36,7 +35,7 @@ Explore all available models and find the one that suits you best [here](https:/
3635

3736
<curl>
3837
```bash
39-
curl https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-small \
38+
curl https://api-inference.huggingface.co/models/facebook/mask2former-swin-large-coco-panoptic \
4039
-X POST \
4140
--data-binary '@cats.jpg' \
4241
-H 'Authorization: Bearer hf_***'
@@ -47,7 +46,7 @@ curl https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-smal
4746
```py
4847
import requests
4948

50-
API_URL = "https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-small"
49+
API_URL = "https://api-inference.huggingface.co/models/facebook/mask2former-swin-large-coco-panoptic"
5150
headers = {"Authorization": "Bearer hf_***"}
5251

5352
def query(filename):
@@ -67,7 +66,7 @@ To use the Python client, see `huggingface_hub`'s [package reference](https://hu
6766
async function query(filename) {
6867
const data = fs.readFileSync(filename);
6968
const response = await fetch(
70-
"https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-small",
69+
"https://api-inference.huggingface.co/models/facebook/mask2former-swin-large-coco-panoptic",
7170
{
7271
headers: {
7372
Authorization: "Bearer hf_***",

docs/api-inference/tasks/zero-shot-classification.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ For more details about the `zero-shot-classification` task, check out its [dedic
2525
### Recommended models
2626

2727
- [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli): Powerful zero-shot text classification model.
28-
- [MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7](https://huggingface.co/MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7): Powerful zero-shot multilingual text classification model that can accomplish multiple tasks.
2928

3029
Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=zero-shot-classification&sort=trending).
3130

scripts/api-inference/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"author": "",
1515
"license": "ISC",
1616
"dependencies": {
17-
"@huggingface/tasks": "^0.13.11",
17+
"@huggingface/tasks": "^0.13.13",
1818
"@types/node": "^22.5.0",
1919
"handlebars": "^4.7.8",
2020
"node": "^20.17.0",

scripts/api-inference/pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)