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

unexepect <pad> #93

Open
cdhx opened this issue Dec 20, 2021 · 1 comment
Open

unexepect <pad> #93

cdhx opened this issue Dec 20, 2021 · 1 comment

Comments

@cdhx
Copy link

cdhx commented Dec 20, 2021

hi, thanks for publish this amazing tool !

i run the demo and find some problem

it is said that

ValueError: substring not found 

I find that it is because in line 142 there is a ".index", and the answer is not in input sentence, so it cannot find the answer in sentence
https://github.com/patil-suraj/question_generation/blob/master/pipelines.py#L142

I further output the intermediate result,and find that

input: 42 is the answer to life, the universe and everything.
sents, answers: ['42 is the answer to life, the universe and everything.'] [['<pad> 42']]
answer: [['<pad> 42']]

the model give the answer " 42" which is not in the input sentence " 42 is the answer to life, the universe and everything."

I wonder why there is a and how to solve it

thx

@gabriead
Copy link

gabriead commented Jun 4, 2022

I stumbled upon the same error. Any update on that?

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

2 participants