Closed ghost closed 5 years ago
@SandeepBhutani The issue is that for the Predictor
class currently does not specify a default predictor for wikitables_erm_parser
, which is the model type I shared with you. It does so only for wikitables_mml_parser
(https://github.com/allenai/allennlp/blob/master/allennlp/predictors/predictor.py#L37). However, you can explicitly specify which predictor to use.
Command line:
allennlp predict /path/to/model/file /path/to/input --predictor wikitables-parser
Library:
from allennlp.predictors import Predictor
predictor = Predictor.from_path("/path/to/model", predictor_name='wikitables-parser')
output = predictor.predict_json({"question": "what type of character is kili?", "table": "character\ttype\nkili\tdwarf\nlegolas\telf"})
print(output["answer"])
Thanks .. that worked
This is in related to #3242 . Opening this case , as #3242 is closed.
Hi @pdasigi : Thanks for latest model . Can you please share sample code how to load it. From old code reference I am not able to load it. New code uses
WikiTablesSemanticParser
which needs some parameters. Also, following also give some errorAnd following code gives this error:
Can some sample code be available please, so that latest model can be used (Same way as other samples are listed in https://allennlp.org/models )