Skip to content

Commit 8f0f70e

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

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/question-answering.md
2+
docs/api-inference/tasks/table-question-answering.md
3+
scripts/api-inference/package.json
4+
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_***",

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)