cdqa-suite / cdQA

⛔ [NOT MAINTAINED] An End-To-End Closed Domain Question Answering System.
https://cdqa-suite.github.io/cdQA-website/
Apache License 2.0
616 stars 191 forks source link

Error while working with custom dataset #345

Open falcon-codz opened 4 years ago

falcon-codz commented 4 years ago

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)

falcon-codz commented 4 years ago

removed "df = filter_paragraphs(df)" and its working