Hello. I have a question that for instance, I would like to use 2 types of ODQA in my notebook, the first one based on the text articles the model has been trained on, and the second one based on Wikipedia for the same question. I am unable to achieve this with the following example code I found on a Medium article, and get the error
AttributeError: 'NoneType' object has no attribute 'split'
Any help is appreciated. Basically, I would like to have 2 types of models in the same notebook. I am very new to this library, so can you provide a minimal example to accomplish this? Thank you.
from deeppavlov import configs from deeppavlov.core.commands.infer import build_model # Download all the SQuAD models squad = build_model(configs.squad.multi_squad_noans_infer, download = True) # Do not download the ODQA models, we've just trained it odqa = build_model(configs.odqa.en_odqa_infer_wiki, download = False) # # Download ODQA model for ODQA 2 from Wiki odqa2 = build_model(configs.odqa.en_odqa_infer_wiki, download = True) val_q = "What causes accidents?" answer1 = odqa([val_q]) # provide answer based on trained data answer2 = odqa2([val_q]) # provide answer based on Wikipedia