We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
char end
char start
Hi, The output of model valhalla/t5-base-qg-hl is {question and answer} is it possible to get char end and char start?
valhalla/t5-base-qg-hl
{question and answer}
The text was updated successfully, but these errors were encountered:
Yes, but in a roundabout way:
import pipelines # load text inputs = text_dataset # instantiate QGPipeline qgp = pipelines.QGPipeline(model, ans_model, tokenizer, ans_tokenizer) # extract sentence and answers sentence, extracted_answers = qgp._prepare_inputs_for_ans_extraction(inputs) # search an answer for location char_start index = 0 answer = extracted_answers[index] char_start = extracted_answer.find('<hl>') + 5
Similarly, you can use rrfind('') to search for char_end.
Sorry, something went wrong.
No branches or pull requests
Hi, The output of model
valhalla/t5-base-qg-hl
is{question and answer}
is it possible to get char end and char start?The text was updated successfully, but these errors were encountered: