File size: 601 Bytes
d541e5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import argparse

from src.evaluator import evaluate


def main():
    # parser
    parser = argparse.ArgumentParser(description='inference with model.')
    parser.add_argument('--checkpoint', type=str, help='Path to the checkpoint file')
    parser.add_argument("--decompress", action="store_true", help="decompress the input text")
    parser.add_argument('--vocab', type=str, help='Path to the vocab file')
    parser.add_argument('--text', type=str, help='Text to be tokenized')
    args = parser.parse_args()

    # load model and vocab
    evaluate(args)


if __name__ == "__main__":
    main()