Skip to content

greenygh0st/mini-embed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Mini Embed Service

A lightweight, containerized embedding API that runs locally using sentence-transformers. Designed to power semantic search and retrieval-augmented generation (RAG) pipelines without relying on OpenAI or external APIs.

Docker Image:

greenygh0st/mini-embed

🚀 Features

  • Runs locally via Flask + Docker
  • Uses the nomic-ai/nomic-embed-text-v1 model (768-dim embeddings)
  • Accepts text over HTTP and returns vector embeddings
  • CPU-friendly — no GPU required
  • Built-in request logging to STDOUT

📦 Requirements

  • Docker
  • Python (for local testing without Docker)

🔧 Quick Start

▶️ Build and run with Docker

docker build -t mini-embed .
docker run -d -p 5000:5000 --name mini-embed mini-embed

📡 Test the API

curl -X POST http://localhost:5000/embed \
     -H "Content-Type: application/json" \
     -d '{"text": "How do I reset my password?"}'

🔄 API

POST /embed

Request Body:

{
  "text": "Your input text goes here"
}

Response:

{
  "embedding": [0.123, -0.456, ...]
}

🔍 Use Cases

  • Semantic search with PGVector
  • Local RAG pipelines
  • Embedding indexing for internal documents
  • Offline language understanding

🛠️ Configuration

By default, the server listens on:

Host: 0.0.0.0
Port: 5000

Edit embed_server.py to change the model or port.


🧪 Development (without Docker)

pip install flask sentence-transformers
python embed_server.py

📝 License

MIT or similar — use freely, modify as needed.


✨ Inspired By

About

A basic microservice for creating embeds for basic semantic searches

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors