I am using TAPEX for table question answering.
from transformers import AutoTokenizer, AutoModelForSeq2SeqL
import pandas as pd
tokenizer = AutoTokenizer.from_pretrained("microsoft/tapex-base-finetuned-wtq")
model = AutoModelForSeq2SeqLM.from_pretrained("microsoft/tapex-base-finetuned-wtq")
here is a table
data = {"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}
I am trying to answer the following Questions:
questions = ["how many movies does Leonardo Di Caprio have?","how many more movies does Leonardo Di Caprio have than George Clooney?","what's the first name of the actor who has 87 movies?"]
First and last are ok, but 2nd is incorrect. I have tried different question formats (1-4), even similar to the ones given on the website (Example). Test01, Test02, Test03, Test04
I have also tried
data['Number of movies'] = pd.to_numeric(data['Number of movies'])
because numbers were string. Still get 36.
The same problem with average, cannot find the mean/ave of number of movies. Test05 Test06
According to later exploration, TAPEX can use AVE operator, so what's the problem?
Is it because it is a "Language " AI & cannot do maths?