Skip to content

Commit 039daf9

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

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

changed_files.txt

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

docs/api-inference/tasks/question-answering.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ For more details about the `question-answering` task, check out its [dedicated p
2626

2727
- [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2): A robust baseline model for most question answering domains.
2828
- [distilbert/distilbert-base-cased-distilled-squad](https://huggingface.co/distilbert/distilbert-base-cased-distilled-squad): Small yet robust model that can answer questions.
29-
- [google/tapas-base-finetuned-wtq](https://huggingface.co/google/tapas-base-finetuned-wtq): A special model that can answer questions from tables.
3029

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

docs/api-inference/tasks/table-question-answering.md

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

2525
### Recommended models
2626

27-
- [google/tapas-base-finetuned-wtq](https://huggingface.co/google/tapas-base-finetuned-wtq): A robust table question answering model.
2827

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

@@ -35,7 +34,7 @@ Explore all available models and find the one that suits you best [here](https:/
3534

3635
<curl>
3736
```bash
38-
curl https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq \
37+
curl https://api-inference.huggingface.co/models/<REPO_ID> \
3938
-X POST \
4039
-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" ] } }}' \
4140
-H 'Content-Type: application/json' \
@@ -47,7 +46,7 @@ curl https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq
4746
```py
4847
import requests
4948

50-
API_URL = "https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq"
49+
API_URL = "https://api-inference.huggingface.co/models/<REPO_ID>"
5150
headers = {"Authorization": "Bearer hf_***"}
5251

5352
def query(payload):
@@ -78,7 +77,7 @@ To use the Python client, see `huggingface_hub`'s [package reference](https://hu
7877
```js
7978
async function query(data) {
8079
const response = await fetch(
81-
"https://api-inference.huggingface.co/models/google/tapas-base-finetuned-wtq",
80+
"https://api-inference.huggingface.co/models/<REPO_ID>",
8281
{
8382
headers: {
8483
Authorization: "Bearer hf_***",

docs/api-inference/tasks/text-classification.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ For more details about the `text-classification` task, check out its [dedicated
2828
- [ProsusAI/finbert](https://huggingface.co/ProsusAI/finbert): A sentiment analysis model specialized in financial sentiment.
2929
- [cardiffnlp/twitter-roberta-base-sentiment-latest](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest): A sentiment analysis model specialized in analyzing tweets.
3030
- [papluca/xlm-roberta-base-language-detection](https://huggingface.co/papluca/xlm-roberta-base-language-detection): A model that can classify languages.
31+
- [meta-llama/Prompt-Guard-86M](https://huggingface.co/meta-llama/Prompt-Guard-86M): A model that can classify text generation attacks.
3132

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

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)