https://github.com/kunalvirwal/clip-vectorizer
A containerized API for generating Vector embeddings for text and images using the OpenAI CLIP Model utilizing CUDA
https://github.com/kunalvirwal/clip-vectorizer
clip containerized-services fastapi openai python python3 vector-embeddings
Last synced: 3 months ago
JSON representation
A containerized API for generating Vector embeddings for text and images using the OpenAI CLIP Model utilizing CUDA
- Host: GitHub
- URL: https://github.com/kunalvirwal/clip-vectorizer
- Owner: kunalvirwal
- Created: 2024-08-19T21:13:56.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-02T16:35:54.000Z (9 months ago)
- Last Synced: 2025-01-11T18:45:37.513Z (5 months ago)
- Topics: clip, containerized-services, fastapi, openai, python, python3, vector-embeddings
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ***CLIP-Vectorizer***
This is openAI's CLIP model based API that creates text and image vector-embeddings to be stored and query a vector database.## ***Steps To run on localhost using Docker***
- Make sure Docker is installed and running (and using WSL2 engine if in windows).- Follow the steps given in [Nvidia docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) to install nvidia drivers for your distribution (WSL for windows).
- If CUDA drivers are not present or GPU access is not provided to the container, then it will automatically default to computing on CPU.
- This command builds the image to be run inside a container
> `docker build -t vectorizer .`- Run the program inside a container using
> `docker run -it --gpus all -p 5000:8080 vectorizer`## ***API routes***
- `/vectors`> Post route for sending text to be embedded in JSON format.
> Example Input JSON:
> {
> "text" : "Your text here",
> }
- `/vectors_img`> Post route for sending images to be embedded in form-data format.
> Example Input Form-data:
> Key : file | Value : (Your image file)