Skip to content

Hit Error while using this toolkits #31

@Ricardokevins

Description

@Ricardokevins

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions