Hello @charly, Hi @sgugger.
Could you help me with how to work with multiple tables as the data dump (the dump from where the answers need to come.)
I have fine tuned the TAPAS model with the QA csv sheet and now trying to ask question and get answers.
import json
import pandas as pd
with open('/content/mydata.json') as f:
d = json.load(f)
table = pd.DataFrame.from_dict(d, orient='index')
table = table.astype(str)
inputs = tokenizer(table=table, queries=queries, padding='max_length', return_tensors="pt")
I’ve been trying to work with the above code but this seems to combine every individual table into one dataframe, which leads to the “too many rows” error.
The json file data is as below (example) :
[ {'meters': ["<co>"],
'D type': ["PO"],
'Des': ["Value that is."],
'instruc': ["Add accum" ] } ,
{'meters': ["<co>"],
'D type': ["PO"],
'Des': ["register 1."],
'instruc': ["accumulator"]}
]
Most of the examples everywhere use just a single table to showcase the inference step.
Example : data = {"Actors": ["Brad Pitt", "Leonardo Di Caprio", "George Clooney"], "Number of movies": ["87", "53", "69"]}
If the above example is a single table, I have 1000 such tables to get my answer from.
Please Help !!!
Thanks in advance !!!