Skip to content

Commit 5117e31

Browse files
[Snippets] fix table question answering (#1519)
1 parent 3b544a8 commit 5117e31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/inference/src/snippets/templates/python/huggingface_hub/tableQuestionAnswering.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
answer = client.question_answering(
1+
answer = client.table_question_answering(
22
query="{{ inputs.asObj.query }}",
33
table={{ inputs.asObj.table }},
44
model="{{ model.id }}",

packages/tasks-gen/snippets-fixtures/table-question-answering/python/huggingface_hub/0.hf-inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
api_key=os.environ["HF_TOKEN"],
77
)
88

9-
answer = client.question_answering(
9+
answer = client.table_question_answering(
1010
query="How many stars does the transformers repository have?",
1111
table={"Repository":["Transformers","Datasets","Tokenizers"],"Stars":["36542","4512","3934"],"Contributors":["651","77","34"],"Programming language":["Python","Python","Rust, Python and NodeJS"]},
1212
model="google-bert/bert-large-uncased-whole-word-masking-finetuned-squad",

0 commit comments

Comments
 (0)