An open API service indexing awesome lists of open source software.

https://github.com/ablil/embedding-models-api

lightweight API that exposes embedding model
https://github.com/ablil/embedding-models-api

Last synced: 12 days ago
JSON representation

lightweight API that exposes embedding model

Awesome Lists containing this project

README

          

# Text Embedder

Lightweight Flask service that exposes a single endpoint to compute sentence embeddings
using `sentence-transformers` (default model: `sentence-transformers/all-MiniLM-L6-v2`).

The repository includes a `Dockerfile` and `compose.yml` for easy containerized deployment and model caching.

## Get started
```bash
docker compose -f compose.yml up --build
```

A prebuilt image is published to Github container registry on push to **main** branch.

Pull and run the image immediately:
```bash
docker pull ghcr.io/ablil/embedding-models-api:latest
docker run -p 8080:8080 ghcr.io/ablil/embedding-models-api:latest
```

## API

**Embedding**
```shell
curl http://localhost:8080/embed -H 'content-type: application/json' -d '{"texts": ["first", "second"]}'
```

**Health**
```shell
curl http://localhost:8080/health
```