SentenceTransformerを使った文章の類似度計算をするシンプルなサーバーです。
- dockerのビルド
docker-compose up --build
2サーバーにリクエストを送る
curl -X 'POST' \
'http://0.0.0.0:8000/cosine_similarity/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"sentence1": "string",
"sentence2": "string"
}'
レスポンス
{
0.9999998807907104
}
Apache License 2.0