TEXT or PDF file.
The sentence closest to the input prompt.
This model requires additional module if you want to load pdf file.
pip3 install pdfminer.six
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
For the sample text,
$ python3 sentence_transformer_japanese.py
If you want to specify the text or pdf file, put the file path after the -i
option.
$ python3 sentence_transformer_japanese.py -i FILE_PATH
User (press q to exit): nnapiの速度
Text: 実際、弊社でもSnapdragon 8+ Gen1とyolox_tinyにおいて、CPU(float)に比べてNNAPI NPU(int8)で15倍高速に動作することを確認しています。 (Similarity:0.592)
Pytorch
ONNX opset=11