Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changed_files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs/api-inference/tasks/image-segmentation.md
docs/api-inference/tasks/zero-shot-classification.md
scripts/api-inference/package.json
scripts/api-inference/pnpm-lock.yaml
7 changes: 3 additions & 4 deletions docs/api-inference/tasks/image-segmentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ For more details about the `image-segmentation` task, check out its [dedicated p

### Recommended models

- [openmmlab/upernet-convnext-small](https://huggingface.co/openmmlab/upernet-convnext-small): Solid semantic segmentation model trained on ADE20k.
- [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.

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).
Expand All @@ -36,7 +35,7 @@ Explore all available models and find the one that suits you best [here](https:/

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

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

def query(filename):
Expand All @@ -67,7 +66,7 @@ To use the Python client, see `huggingface_hub`'s [package reference](https://hu
async function query(filename) {
const data = fs.readFileSync(filename);
const response = await fetch(
"https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-small",
"https://api-inference.huggingface.co/models/facebook/mask2former-swin-large-coco-panoptic",
{
headers: {
Authorization: "Bearer hf_***",
Expand Down
1 change: 0 additions & 1 deletion docs/api-inference/tasks/zero-shot-classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ For more details about the `zero-shot-classification` task, check out its [dedic
### Recommended models

- [facebook/bart-large-mnli](https://huggingface.co/facebook/bart-large-mnli): Powerful zero-shot text classification model.
- [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.

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).

Expand Down
2 changes: 1 addition & 1 deletion scripts/api-inference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@huggingface/tasks": "^0.13.11",
"@huggingface/tasks": "^0.13.13",
"@types/node": "^22.5.0",
"handlebars": "^4.7.8",
"node": "^20.17.0",
Expand Down
10 changes: 5 additions & 5 deletions scripts/api-inference/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading