-
Notifications
You must be signed in to change notification settings - Fork 72
/
cli.py
33 lines (26 loc) · 793 Bytes
/
cli.py
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
29
30
31
32
33
# -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description: cli entry point
"""
import sys
import fire
sys.path.append('..')
from similarities.faiss_bert_similarity import bert_embedding, bert_index, bert_filter, bert_server
from similarities.faiss_clip_similarity import clip_embedding, clip_index, clip_filter, clip_server
def main():
"""Main entry point"""
fire.Fire(
{
"bert_embedding": bert_embedding,
"bert_index": bert_index,
"bert_filter": bert_filter,
"bert_server": bert_server,
"clip_embedding": clip_embedding,
"clip_index": clip_index,
"clip_filter": clip_filter,
"clip_server": clip_server,
}
)
if __name__ == "__main__":
main()