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

Hit Error while using this toolkits #31

Open
Ricardokevins opened this issue Oct 25, 2021 · 0 comments
Open

Hit Error while using this toolkits #31

Ricardokevins opened this issue Oct 25, 2021 · 0 comments

Comments

@Ricardokevins
Copy link

Ricardokevins commented Oct 25, 2021

Loading Named Entity Recognition Pipeline...
Loading Relation Extraction Pipeline...
Fact Score: 0.5714285714285714
Loading Question Generation Pipeline...
Loading Question Answering Pipeline...
Traceback (most recent call last):
File "testcase.py", line 5, in
print(factsumm(article, summary, verbose=False))
File "/usr/local/lib/python3.8/dist-packages/factsumm/init.py", line 366, in call
qags_score = self.extract_qas(
File "/usr/local/lib/python3.8/dist-packages/factsumm/init.py", line 263, in extract_qas
source_answers = self.qa(source, summary_qas)
File "/usr/local/lib/python3.8/dist-packages/factsumm/utils/level_sentence.py", line 100, in answer_question
pred = qa(
File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/question_answering.py", line 248, in call
return super().call(examples[0], **kwargs)
File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/base.py", line 915, in call
return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)
File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/base.py", line 923, in run_single
outputs = self.postprocess(model_outputs, **postprocess_params)
File "/usr/local/lib/python3.8/dist-packages/transformers/pipelines/question_answering.py", line 409, in postprocess
min_null_score = min(min_null_score, (start_[0] * end_[0]).item())
ValueError: can only convert an array of size 1 to a Python scalar

while using provided example in README, I meet the Error above
( I use pip install to install this packet and create the python file, copy the example code and run )
pip uninstall and pip reinstall doesn`t help QAQ
any suggestion are greatly appreciated!

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