Spaces:
Build error
Build error
File size: 623 Bytes
e62781a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#!/usr/bin/env python3
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import os
from ..tokenizers import CoreNLPTokenizer
from ..retriever import TfidfDocRanker
from ..retriever import DocDB
from .. import DATA_DIR
DEFAULTS = {
'tokenizer': CoreNLPTokenizer,
'ranker': TfidfDocRanker,
'db': DocDB,
'reader_model': os.path.join(DATA_DIR, 'reader/multitask.mdl'),
}
def set_default(key, value):
global DEFAULTS
DEFAULTS[key] = value
from .drqa import DrQA
|