Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhangyuan/text2vec-api
https://github.com/zhangyuan/text2vec-api
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/zhangyuan/text2vec-api
- Owner: zhangyuan
- License: mit
- Created: 2023-11-02T10:19:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-06T10:21:15.000Z (about 1 year ago)
- Last Synced: 2024-10-27T14:35:28.597Z (3 months ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# text2vec-api
A simple wrapper to text2vec to serve embedding as HTTP API.
## Setup
### Run with Docker
```bash
docker run -p 127.0.0.1:9008:8000 zhangyuan/text2vec-api
```### Run with source code
Install the depedencies:
```bash
pip install -r requirements-mac.txt
# or# pip install -r requirements.txt && pip install -r requirements-linux-torch
```Launch the server:
```bash
make serve
```## How to use the API
### Get request
Visit to get the embeddings.
### Post request
The server also supports `POST` request to `/embeddings` with request body like
```json
{
"input": "hello"
}
```