/cosine-sim-server

sentence-transformersを使った文章の類似度の計算サーバー

Primary LanguagePythonApache License 2.0Apache-2.0

文章類似計算をするシンプルサーバー

SentenceTransformerを使った文章の類似度計算をするシンプルなサーバーです。

使い方

  1. 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