diff --git a/docs/api-inference/tasks/image-segmentation.md b/docs/api-inference/tasks/image-segmentation.md index 90017e6f6..437b599f8 100644 --- a/docs/api-inference/tasks/image-segmentation.md +++ b/docs/api-inference/tasks/image-segmentation.md @@ -24,7 +24,7 @@ For more details about the `image-segmentation` task, check out its [dedicated p ### Recommended models -- [nvidia/segformer-b0-finetuned-ade-512-512](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512): Semantic segmentation model trained on ADE20k benchmark dataset with 512x512 resolution. +- [nvidia/segformer-b0-finetuned-ade-512-512](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512): Semantic segmentation model trained on ADE20k 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). diff --git a/docs/api-inference/tasks/object-detection.md b/docs/api-inference/tasks/object-detection.md index b01776f25..40ed3f7d4 100644 --- a/docs/api-inference/tasks/object-detection.md +++ b/docs/api-inference/tasks/object-detection.md @@ -24,8 +24,7 @@ For more details about the `object-detection` task, check out its [dedicated pag ### Recommended models -- [facebook/detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50): Solid object detection model trained on the benchmark dataset COCO 2017. -- [microsoft/beit-base-patch16-224-pt22k-ft22k](https://huggingface.co/microsoft/beit-base-patch16-224-pt22k-ft22k): Strong object detection model trained on ImageNet-21k dataset. +- [facebook/detr-resnet-50](https://huggingface.co/facebook/detr-resnet-50): Solid object detection model pre-trained on the COCO 2017 dataset. Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=object-detection&sort=trending). diff --git a/docs/api-inference/tasks/question-answering.md b/docs/api-inference/tasks/question-answering.md index 1a2beb24f..c4aa92441 100644 --- a/docs/api-inference/tasks/question-answering.md +++ b/docs/api-inference/tasks/question-answering.md @@ -26,6 +26,7 @@ For more details about the `question-answering` task, check out its [dedicated p - [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2): A robust baseline model for most question answering domains. - [distilbert/distilbert-base-cased-distilled-squad](https://huggingface.co/distilbert/distilbert-base-cased-distilled-squad): Small yet robust model that can answer questions. +- [google/tapas-base-finetuned-wtq](https://huggingface.co/google/tapas-base-finetuned-wtq): A special model that can answer questions from tables. Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=question-answering&sort=trending). diff --git a/docs/api-inference/tasks/table-question-answering.md b/docs/api-inference/tasks/table-question-answering.md index 75387053c..a460c6177 100644 --- a/docs/api-inference/tasks/table-question-answering.md +++ b/docs/api-inference/tasks/table-question-answering.md @@ -24,6 +24,7 @@ For more details about the `table-question-answering` task, check out its [dedic ### Recommended models +- [google/tapas-base-finetuned-wtq](https://huggingface.co/google/tapas-base-finetuned-wtq): A robust table question answering model. Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=table-question-answering&sort=trending). @@ -34,7 +35,7 @@ Explore all available models and find the one that suits you best [here](https:/ ```bash -curl https://api-inference.huggingface.co/models/ \ +curl https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq \ -X POST \ -d '{"inputs": { "query": "How many stars does the transformers repository have?", "table": { "Repository": ["Transformers", "Datasets", "Tokenizers"], "Stars": ["36542", "4512", "3934"], "Contributors": ["651", "77", "34"], "Programming language": [ "Python", "Python", "Rust, Python and NodeJS" ] } }}' \ -H 'Content-Type: application/json' \ @@ -46,7 +47,7 @@ curl https://api-inference.huggingface.co/models/ \ ```py import requests -API_URL = "https://api-inference.huggingface.co/models/" +API_URL = "https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq" headers = {"Authorization": "Bearer hf_***"} def query(payload): @@ -77,7 +78,7 @@ To use the Python client, see `huggingface_hub`'s [package reference](https://hu ```js async function query(data) { const response = await fetch( - "https://api-inference.huggingface.co/models/", + "https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq", { headers: { Authorization: "Bearer hf_***" diff --git a/docs/api-inference/tasks/token-classification.md b/docs/api-inference/tasks/token-classification.md index d1055343a..3ce03dd37 100644 --- a/docs/api-inference/tasks/token-classification.md +++ b/docs/api-inference/tasks/token-classification.md @@ -131,7 +131,8 @@ If `stream` is `false` (default), the response will be a JSON object with the fo | Body | | | :--- | :--- | :--- | | **(array)** | _object[]_ | Output is an array of objects. | -| **        entity_group** | _string_ | The predicted label for that group of tokens | +| **        entity_group** | _string_ | The predicted label for a group of one or more tokens | +| **        entity** | _string_ | The predicted label for a single token | | **        score** | _number_ | The associated score / probability | | **        word** | _string_ | The corresponding text | | **        start** | _integer_ | The character position in the input where this group begins. | diff --git a/docs/api-inference/tasks/zero-shot-classification.md b/docs/api-inference/tasks/zero-shot-classification.md index 8401bcf93..f7e50572f 100644 --- a/docs/api-inference/tasks/zero-shot-classification.md +++ b/docs/api-inference/tasks/zero-shot-classification.md @@ -25,6 +25,7 @@ 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). diff --git a/scripts/api-inference/templates/task/chat-completion.handlebars b/scripts/api-inference/templates/task/chat-completion.handlebars index ddeff3e4d..610327e33 100644 --- a/scripts/api-inference/templates/task/chat-completion.handlebars +++ b/scripts/api-inference/templates/task/chat-completion.handlebars @@ -17,6 +17,21 @@ This is a subtask of [`text-generation`](https://huggingface.co/docs/api-inferen - [{{this.id}}](https://huggingface.co/{{this.id}}): {{this.description}} {{/each}} +### API Playground + +For Chat Completion models, we provide an interactive UI Playground for easier testing: + +- Quickly iterate on your prompts from the UI. +- Set and override system, assistant and user messages. +- Browse and select models currently available on the Inference API. +- Compare the output of two models side-by-side. +- Adjust requests parameters from the UI. +- Easily switch between UI view and code snippets. + + + +Access the Inference UI Playground and start exploring: [https://huggingface.co/playground](https://huggingface.co/playground) + ### Using the API The API supports: