Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while working with custom dataset #345

Open
falcon-codz opened this issue Feb 28, 2020 · 1 comment
Open

Error while working with custom dataset #345

falcon-codz opened this issue Feb 28, 2020 · 1 comment

Comments

@falcon-codz
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant