Tasks

Table Question Answering

Table Question Answering (Table QA) is the answering a question about an information on a given table.

Inputs
Rank Name No.of reigns Combined days
1 lou Thesz 3 3749
2 Ric Flair 8 3103
3 Harley Race 7 1799
Question

What is the number of reigns for Harley Race?

Table Question Answering Model
Output
Result

7

About Table Question Answering

Use Cases

SQL execution

You can use the Table Question Answering models to simulate SQL execution by inputting a table.

Table Question Answering

Table Question Answering models are capable of answering questions based on a table.

Task Variants

This place can be filled with variants of this task if there's any.

Inference

You can infer with TableQA models using the 🤗 Transformers library.

from transformers import pipeline
import pandas as pd

# prepare table + question
data = {"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}
table = pd.DataFrame.from_dict(data)
question = "how many movies does Leonardo Di Caprio have?"

# pipeline model
# Note: you must to install torch-scatter first.
tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")

# result

print(tqa(table=table, query=question)['cells'][0])
#53

Useful Resources

In this area, you can insert useful resources about how to train or use a model for this task.

This task page is complete thanks to the efforts of Hao Kim Tieu. 🦸

Compatible libraries

Table Question Answering demo
Inference Examples
Inference API (serverless) is not available, repository is disabled.
Models for Table Question Answering
Browse Models (106)

Note A table question answering model that is capable of neural SQL execution, i.e., employ TAPEX to execute a SQL query on a given table.

Datasets for Table Question Answering
Browse Datasets (456)

No example dataset is defined for this task.

Note Contribute by proposing a dataset for this task !

Spaces using Table Question Answering

No example Space is defined for this task.

Note Contribute by proposing a Space for this task !

Metrics for Table Question Answering
Denotation Accuracy
Checks whether the predicted answer(s) is the same as the ground-truth answer(s).