I'm new to Allennlp, and this is my first time trying it out. I already installed all the required libraries !pip install allennlp !pip install --pre allennlp-models
and my code should be fine too, but I still get this error message saying: ConfigurationError: key "matrix_attention" is required at location "model."
Here's my code:
import sys
from allennlp.predictors.predictor import Predictor
import allennlp_models
predictor = Predictor.from_path(
"https://storage.googleapis.com/allennlp-public-models/bidaf-elmo-model-2018.11.30-charpad.tar.gz"
)
prediction = predictor.predict(
passage="Life expectancy in Asia is at 68 years", question="What is the life expectancy in Asia"
)
print(prediction["best_span_str"])
Do you have any idea how to fix this error? I'm using macOS Catalina and Python 3.6. I really don't know what to do now, so I really need your help. Thanks in advance!