Expose sentence_transformers as a HTTP server
docker-compose up --build -d
curl -X POST "127.0.0.1:5000/" -d '{ "sentences": ["hello!"] }'
{"count":1,"embeddings":[[ <sentence_embedding> ]]}
curl -X POST "127.0.0.1:5000/" -d '{ "sentences": ["hello!", "world"] }'
{"count":2,"embeddings":[[ <sentence_embedding> ],[ <sentence_embedding> ]]}
Key | Default | Available Options |
---|---|---|
MODEL | all-MiniLM-L6-v2 | https://huggingface.co/sentence-transformers#models |
PORT | 5000 |