Skip to content

bmpickford/bert-encoder-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bert-encoder-server

Expose sentence_transformers as a HTTP server

Running

docker-compose up --build -d

Usage

Single sentence request

curl -X POST "127.0.0.1:5000/" -d '{ "sentences": ["hello!"] }'

Single sentence response

{"count":1,"embeddings":[[ <sentence_embedding> ]]}

Multiple sentence request

curl -X POST "127.0.0.1:5000/" -d '{ "sentences": ["hello!", "world"] }'
{"count":2,"embeddings":[[ <sentence_embedding> ],[ <sentence_embedding> ]]}

Configuration

Key Default Available Options
MODEL all-MiniLM-L6-v2 https://huggingface.co/sentence-transformers#models
PORT 5000

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published