-
Notifications
You must be signed in to change notification settings - Fork 738
Closed
Description
Hello, I am new to txtai and I want to know if I can have a list of results with the QA approach.
My code is:
context = ["The doctor administered a 7g dose of Acetarsol and a 16mg dose of Ibuprofen",
"The patient took one Alosetron tablet"]
queries = ["What is the drug taken?", "What is the dose?"]
questions = Questions(path=("sultan/BioM-ELECTRA-Large-SQuAD2-BioASQ8B", tokenizer), gpu=True)
results = [questions([question] * len(context), context) for question in queries]
results.append(context)
pd.DataFrame(list(zip(*results)), columns=["Drug", "Dose", "Text"])
I would like to have this result.
Drug | Dose | Text |
---|---|---|
Acetarsol | 7g | The doctor administered a 7g dose of Acetarsol and a 16mg dose of Ibuprofen |
Ibuprofen | 16mg | The doctor administered a 7g dose of Acetarsol and a 16mg dose of Ibuprofen |
Alosetron | None | The patient took one Alosetron tablet |
thank you for your help
Metadata
Metadata
Assignees
Labels
No labels