I am getting response properly for queries while using BNP dataset. But while created my own custom dataset I'm receiving " AttributeError: Can only use .str accessor with string values! " error.
Data set:
title,paragraphs
Builder,"['Built by Shah Jahan, a Mughal Emperor and son of Jahangir','More than 20000 labourers were put in task and it took 14 years to build it']"
For whom,"['Taj Mahal is tomb of Mumtaj Mahal, wife of shah jahan','Mumtaj Mahal died while giving birth to her 14th child']"
location,"['Taj mahan is situated in Agra which is 4 hours drive from Delhi', 'One can reach Taj Mahal by road or Train']"
remarks,"['Taj Mahal is built with white marbels from rajasthan','it is one of the seven wonders of world']"
I am getting response properly for queries while using BNP dataset. But while created my own custom dataset I'm receiving " AttributeError: Can only use .str accessor with string values! " error.
Data set:
title,paragraphs Builder,"['Built by Shah Jahan, a Mughal Emperor and son of Jahangir','More than 20000 labourers were put in task and it took 14 years to build it']" For whom,"['Taj Mahal is tomb of Mumtaj Mahal, wife of shah jahan','Mumtaj Mahal died while giving birth to her 14th child']" location,"['Taj mahan is situated in Agra which is 4 hours drive from Delhi', 'One can reach Taj Mahal by road or Train']" remarks,"['Taj Mahal is built with white marbels from rajasthan','it is one of the seven wonders of world']"
This is the Code-
`df = pd.read_csv('./data/gokul.csv', converters={'paragraphs': literal_eval}) df = filter_paragraphs(df) #error
instantiate cdQA pipeline
cdqa_pipeline = QAPipeline(reader='./models/bert_qa.joblib') cdqa_pipeline.fit_retriever(df=df)`
error is in line filter_paragraphs(df)